Generated on for Gecode by doxygen 1.18.0

Values for the param statements of a spec. More...

#include <gecode/instance.hh>

Public Member Functions

 Params (void)
 No parameters.
void set (const std::string &name, const std::string &value)
 Set parameter name to value.
void set (const std::string &assignments)
 Parse and set parameters given as name=value.
bool get (const std::string &name, std::string &value) const
 Return whether name is set, and if so store its value in value.
int size (void) const
 Return number of parameters.
std::string name (int i) const
 Return the name of parameter i.

Detailed Description

Values for the param statements of a spec.

Definition at line 364 of file instance.hh.

Constructor & Destructor Documentation

◆ Params()

Gecode::Instance::Params::Params ( void )

No parameters.

Member Function Documentation

◆ set() [1/2]

void Gecode::Instance::Params::set ( const std::string & name,
const std::string & value )

Set parameter name to value.

◆ set() [2/2]

void Gecode::Instance::Params::set ( const std::string & assignments)

Parse and set parameters given as name=value.

Several parameters are separated by commas, as in a=1,b=2, so a value cannot contain a comma, and empty items are skipped. Throws Error if a parameter does not have the form name=value.

◆ get()

bool Gecode::Instance::Params::get ( const std::string & name,
std::string & value ) const

Return whether name is set, and if so store its value in value.

◆ size()

int Gecode::Instance::Params::size ( void ) const

Return number of parameters.

◆ name()

std::string Gecode::Instance::Params::name ( int i) const

Return the name of parameter i.


The documentation for this class was generated from the following file: