instance.hh
Go to the documentation of this file.
502 Data read_text(const std::string& text, const std::string& origin = "<input>", const Params& p = Params()) const;
515 Data catalog_text(const std::string& text, const std::string& origin = "<input>", const Params& p = Params()) const;
Exception(const char *l, const char *i) noexcept
Initialize with location l and information i.
IntArgs ints(const std::string &n, const IntArgs &path=IntArgs()) const
Return all integers in the array or row n at path.
int size(const std::string &n, const IntArgs &path=IntArgs()) const
Return the length of the array or row n at path.
double number(const std::string &n, const IntArgs &path=IntArgs()) const
Return the number n at path (integers are converted).
ValueType type(const std::string &n) const
Return the value type of entry n.
std::string text(const std::string &n, const IntArgs &path=IntArgs()) const
Return the string n at path.
int depth(const std::string &n) const
Return the depth of entry n (0 for scalars).
std::string name(int i) const
Return name of entry i, in the order they were defined.
long long int integer(const std::string &n, const IntArgs &path=IntArgs()) const
Return the integer n at path.
ArgArray< double > numbers(const std::string &n, const IntArgs &path=IntArgs()) const
Return all numbers in the array or row n at path.
virtual const char * what(void) const noexcept override
Return the full message.
bool get(const std::string &name, std::string &value) const
Return whether name is set, and if so store its value in value.
void set(const std::string &assignments)
Parse and set parameters given as name=value.
void set(const std::string &name, const std::string &value)
Set parameter name to value.
static Spec parse(const std::string &text, const std::string &origin="<spec>")
Parse spec text, using origin in error messages.
Data read_text(const std::string &text, const std::string &origin="<input>", const Params &p=Params()) const
Read instance text, using origin in error messages.
Data read(const std::string &path, const Params &p=Params()) const
Read instance file path.
std::string name(void) const
Return the format name declared by the spec (may be empty).
Data catalog(const std::string &path, const Params &p=Params()) const
List the instances in file path.
Data catalog_text(const std::string &text, const std::string &origin="<input>", const Params &p=Params()) const
List the instances in text, using origin in error messages.
Reading instance files described by reader specs.
Gecode toplevel namespace
void path(Home home, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a Hamiltonian path.
