MCPcopy Create free account
hub / github.com/Gecode/gecode / Literal

Class Literal

gecode/int/ldsb.hh:46–64  ·  view source on GitHub ↗

A Literal is a pair of variable index and value.

Source from the content-addressed store, hash-verified

44
45 /// A Literal is a pair of variable index and value.
46 class Literal {
47 public:
48 /// Constructor for an empty literal
49 Literal(void);
50 /// Constructor
51 Literal(int _var, int _val);
52
53 /// Variable index. The ViewArray that the index is meant
54 /// for is assumed to be known by context.
55 int _variable;
56 /// The value of the literal. For int and bool variables,
57 /// this is the value itself; for set variables, this is
58 /// one of the possible elements of the set.
59 int _value;
60
61 /// Less than. The ordering is the lexicographical order
62 /// on the (variable,value) pair.
63 bool operator <(const Literal &rhs) const;
64 };
65
66 /**
67 * \brief Find the location of an integer in a collection of

Callers 7

specialUpdateFunction · 0.85
commitMethod · 0.85
symmetricMethod · 0.85
choiceMethod · 0.85
commitMethod · 0.85
symmetricMethod · 0.85
symmetricMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected