38 #ifndef __GECODE_INT_LDSB_HH__ 39 #define __GECODE_INT_LDSB_HH__ 47 namespace Gecode {
namespace Int {
namespace LDSB {
83 findVar(
int *indices,
unsigned int n_values,
unsigned int seq_size,
int index);
108 namespace Gecode {
namespace Int {
namespace LDSB {
171 virtual void update(
Literal) = 0;
175 virtual size_t dispose(
Space& home) = 0;
179 static void*
operator new(
size_t s,
Space& home);
181 static void operator delete(
void*,
Space&);
183 static void operator delete(
void*);
186 template <
class View>
197 virtual size_t dispose(
Space& home);
206 template <
class View>
217 virtual size_t dispose(
Space& home);
226 template <
class View>
259 virtual size_t dispose(
Space& home);
268 template <
class View>
293 virtual size_t dispose(
Space& home);
308 const Literal *
const _literals;
310 const int _nliterals;
315 const Literal* literals,
int nliterals);
319 const Literal* literals(
void)
const;
321 int nliterals(
void)
const;
323 virtual size_t size(
void)
const;
325 virtual void archive(
Archive& e)
const;
336 template<
class View,
int n,
class Val,
unsigned int a,
337 class Filter,
class Print>
368 virtual size_t dispose(
Space& home);
381 template<
class View,
int n,
class Val,
unsigned int a>
Int::LDSB::Literal ValueType
VarImpBase ** xs
Array of variables in symmetry.
unsigned int n_indices
Total number of indices (n_seqs * seq_size)
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel)
Post propagator for .
IntSet values
Set of symmetric values.
A Literal is a pair of variable index and value.
unsigned int lookup_size
Size of lookup.
IntArgs values
Array of values in symmetry.
std::pair< int, int > findVar(int *indices, unsigned int n_values, unsigned int seq_size, int index)
Find the location of an integer in a collection of sequences.
View::VarType Var
The corresponding variable.
Implementation of a value symmetry at the modelling level.
Implementation of a value sequence symmetry at the modelling level.
std::function< void(const Space &home, const Brancher &b, unsigned int a, Var x, int i, const Val &m, std::ostream &o)> VarValPrint
Function type for printing variable and value selection.
void postldsbbrancher(Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter< typename View::VarType > bf, VarValPrint< typename View::VarType, Val > vvp)
Post LDSB brancher.
int ModEvent
Type for modification events.
Implementation of a symmetry at the modelling level.
Implementation of a variable sequence symmetry.
Support::BitSetOffset< Space > values
Symmetric values.
int * lookup
Map from variable's index to its sequence and position.
int _value
The value of the literal. For int and bool variables, this is the value itself; for set variables...
Base-class for variable implementations.
int _variable
Variable index. The ViewArray that the index is meant for is assumed to be known by context...
Base-class for both propagators and branchers.
int nxs
Number of variables in symmetry.
ArgArray< Int::LDSB::Literal > LiteralArgs
An array of literals.
bool operator<(const Literal &rhs) const
Less than. The ordering is the lexicographical order on the (variable,value) pair.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Choice storing position and value, and symmetric literals to be excluded on the right branch...
Base-class for branchers.
int n
Number of negative literals for node type.
unsigned int n_seqs
Number of sequences in symmetry.
Argument array for non-primitive types.
unsigned int * indices
Array of variable indices.
Generic brancher by view and value selection.
Literal(void)
Constructor for an empty literal.
ModEvent prune(Space &home, View x, int v)
Exclude value from variable view .
Implementation of a variable symmetry at the modelling level.
Implementation of a value symmetry.
std::function< bool(const Space &home, Var x, int i)> BranchFilter
Function type for branch filter functions.
unsigned int size(I &i)
Size of all ranges of range iterator i.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
unsigned int seq_size
Size of each sequence in symmetry.
ArgArray< VarImpBase * > ArgsType
int nxs
Number of variables in symmetry.
Support::BitSet< Space > dead_sequences
Which sequences are dead.
int seq_size
Size of each sequence in symmetry.
Symmetry-breaking brancher with generic view and value selection.
Implementation of a variable sequence symmetry at the modelling level.
Support::BitSetOffset< Space > indices
Symmetric variable indices.
VarImpBase ** xs
Array of variables in symmetry.
int seq_size
Size of each sequence in symmetry.
Passing integer arguments.
unsigned int seq_size
Size of each sequence in symmetry.
double position(const Space &home, IntVar x, int i)
unsigned int n_values
Total number of values (n_seqs * seq_size)
Implementation of a single symmetry.
Choice for performing commit
Implementation of a variable symmetry.
Implementation of a value sequence symmetry.
Post propagator for SetVar x
int _nsyms
Number of symmetry implementations.
SymmetryImp< View > ** _syms
Array of symmetry implementations.
Traits of arrays in Gecode.
unsigned int n_seqs
Number of sequences in symmetry.
Gecode toplevel namespace
#define GECODE_VTABLE_EXPORT
#define GECODE_INT_EXPORT
ArgArray< VarImpBase * > StorageType
Home class for posting propagators
Choice storing position and value
int nrefs
Number of references that point to this symmetry object.
Bitsets with index offset.
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
int * values
Set of sequences.