Class model::BaseModel
BaseModel class (non-markov specific)
Base class implementing methods needed for model selection. A pointer to this base class can be used by the owner of the model (through it needs to be dynamic-cast to a pointer to the specific model type when setting it on the solver). [!NOTE] This is different from the markov::Model class which has the interfaces to interact with markov-based optimizers.
Constructors
BaseModel()
Declaration
model::BaseModel::BaseModel()=default
Methods
~BaseModel()
Declaration
virtual model::BaseModel::~BaseModel()=default
get_identifier()
Returns the identifier string of the model type (e.g., "ising").
Declaration
virtual std::string model::BaseModel::get_identifier() const =0
get_version()
Returns the version of the input format this implementation expects.
Declaration
virtual std::string model::BaseModel::get_version() const =0
configure()
Populates model internals from the input json.
Declaration
void model::BaseModel::configure(const utils::Json&json) override
configure()
Populates model internals from the input configuration.
Declaration
void model::BaseModel::configure(BaseModelConfiguration&configuration)
configure()
Populates the model from a related model The trelated model is considered useless after this.
Declaration
void model::BaseModel::configure(BaseModel *base)
init()
Initializes internal data structures (guaranteed to be called after configure()
).
Declaration
void model::BaseModel::init()
match_version()
Checks the string argument against the expected version.
This can be overloaded to accept other version than the one returned by get_version()
.
Declaration
void model::BaseModel::match_version(const std::string&version)