ldsb.hh
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christopher Mears <chris.mears@monash.edu>
*
* Copyright:
* Christopher Mears, 2012
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef __GECODE_INT_LDSB_HH__
#define __GECODE_INT_LDSB_HH__
#include <gecode/int.hh>
namespace Gecode { namespace Int { namespace LDSB {
class Literal {
public:
Literal(void);
Literal(int _var, int _val);
int _variable;
int _value;
bool operator <(const Literal &rhs) const;
};
GECODE_INT_EXPORT
std::pair<int,int>
findVar(int *indices, unsigned int n_values, unsigned int seq_size, int index);
}}}
namespace Gecode {
template<>
class ArrayTraits<ArgArray<VarImpBase*> > {
public:
typedef ArgArray<VarImpBase*> StorageType;
typedef VarImpBase* ValueType;
typedef ArgArray<VarImpBase*> ArgsType;
};
typedef ArgArray<Int::LDSB::Literal> LiteralArgs;
template<>
class ArrayTraits<LiteralArgs> {
public:
typedef LiteralArgs StorageType;
typedef Int::LDSB::Literal ValueType;
typedef LiteralArgs ArgsType;
};
}
namespace Gecode { namespace Int { namespace LDSB {
class GECODE_INT_EXPORT SymmetryObject {
public:
int nrefs;
SymmetryObject(void);
virtual ~SymmetryObject(void);
};
class GECODE_INT_EXPORT VariableSymmetryObject : public SymmetryObject {
public:
VarImpBase** xs;
int nxs;
VariableSymmetryObject(ArgArray<VarImpBase*> vars);
~VariableSymmetryObject(void);
};
class GECODE_INT_EXPORT ValueSymmetryObject : public SymmetryObject {
public:
IntSet values;
ValueSymmetryObject(IntSet vs);
};
class GECODE_INT_EXPORT VariableSequenceSymmetryObject : public SymmetryObject {
public:
VarImpBase** xs;
int nxs;
int seq_size;
VariableSequenceSymmetryObject(ArgArray<VarImpBase*> vars, int ss);
~VariableSequenceSymmetryObject();
};
class GECODE_INT_EXPORT ValueSequenceSymmetryObject : public SymmetryObject {
public:
IntArgs values;
int seq_size;
ValueSequenceSymmetryObject(IntArgs vs, int ss);
};
template<class View>
class SymmetryImp {
public:
virtual ArgArray<Literal> symmetric(Literal, const ViewArray<View>&) const = 0;
virtual void update(Literal) = 0;
virtual SymmetryImp<View>* copy(Space& home) const = 0;
virtual size_t dispose(Space& home) = 0;
virtual ~SymmetryImp(void);
static void* operator new(size_t s, Space& home);
static void operator delete(void*,Space&);
static void operator delete(void*);
};
template <class View>
class VariableSymmetryImp : public SymmetryImp<View> {
protected:
Support::BitSetOffset<Space> indices;
public:
VariableSymmetryImp<View>(Space& home, int* vs, unsigned int n);
VariableSymmetryImp<View>(Space& home, const VariableSymmetryImp<View>& other);
virtual size_t dispose(Space& home);
void update(Literal);
virtual ArgArray<Literal> symmetric(Literal, const ViewArray<View>&) const;
SymmetryImp<View>* copy(Space& home) const;
};
template <class View>
class ValueSymmetryImp : public SymmetryImp<View>
{
public:
Support::BitSetOffset<Space> values;
ValueSymmetryImp<View>(Space& home, int* vs, unsigned int n);
ValueSymmetryImp<View>(Space& home, const ValueSymmetryImp<View>& other);
virtual size_t dispose(Space& home);
void update(Literal);
virtual ArgArray<Literal> symmetric(Literal, const ViewArray<View>&) const;
SymmetryImp<View>* copy(Space& home) const;
};
template <class View>
class VariableSequenceSymmetryImp : public SymmetryImp<View>
{
protected:
unsigned int *indices;
unsigned int n_indices;
unsigned int seq_size;
unsigned int n_seqs;
// e.g. lookup[2] == 10 indicates that the variable with index 2
// occurs at position 10 in the "indices" array.
// If a variable occurs more than once, only the first occurrence
// is recorded.
// A value of -1 indicates that the variable does not occur in
// "indices".
int *lookup;
unsigned int lookup_size;
int getVal(unsigned int sequence, unsigned int position) const;
public:
VariableSequenceSymmetryImp<View>(Space& home, int *_indices, unsigned int n, unsigned int seqsize);
VariableSequenceSymmetryImp<View>(Space& home, const VariableSequenceSymmetryImp<View>& s);
virtual size_t dispose(Space& home);
void update(Literal);
virtual ArgArray<Literal> symmetric(Literal, const ViewArray<View>&) const;
SymmetryImp<View>* copy(Space& home) const;
};
template <class View>
class ValueSequenceSymmetryImp : public SymmetryImp<View>
{
protected:
int *values;
unsigned int n_values;
unsigned int seq_size;
unsigned int n_seqs;
Support::BitSet<Space> dead_sequences;
int getVal(unsigned int sequence, unsigned int position) const;
private:
ValueSequenceSymmetryImp<View>(const ValueSequenceSymmetryImp<View>&);
public:
ValueSequenceSymmetryImp<View>(Space& home, int* _values, unsigned int n, unsigned int seqsize);
ValueSequenceSymmetryImp<View>(Space& home, const ValueSequenceSymmetryImp<View>& vss);
virtual size_t dispose(Space& home);
void update(Literal);
virtual ArgArray<Literal> symmetric(Literal, const ViewArray<View>&) const;
SymmetryImp<View>* copy(Space& home) const;
};
template<class Val>
class GECODE_VTABLE_EXPORT LDSBChoice : public PosValChoice<Val> {
private:
const Literal * const _literals;
const int _nliterals;
public:
LDSBChoice(const Brancher& b, unsigned int a, const Pos& p, const Val& n,
const Literal* literals, int nliterals);
~LDSBChoice(void);
const Literal* literals(void) const;
int nliterals(void) const;
virtual void archive(Archive& e) const;
};
template<class View, int n, class Val, unsigned int a,
class Filter, class Print>
class LDSBBrancher : public ViewValBrancher<View,n,Val,a,Filter,Print> {
public:
using typename ViewValBrancher<View,n,Val,a,Filter,Print>::Var;
SymmetryImp<View>** _syms;
int _nsyms;
// Position of variable that last choice was created for
int _prevPos;
protected:
LDSBBrancher(Space& home, LDSBBrancher& b);
LDSBBrancher(Home home,
ViewArray<View>& x,
ViewSel<View>* vs[n],
ValSelCommitBase<View,Val>* vsc,
SymmetryImp<View>** syms, int nsyms,
BranchFilter<Var> bf,
VarValPrint<Var,Val> vvp);
public:
virtual const Choice* choice(Space& home);
virtual const Choice* choice(const Space& home, Archive& e);
virtual ExecStatus commit(Space& home, const Choice& c, unsigned int b);
virtual Actor* copy(Space& home);
virtual size_t dispose(Space& home);
static void post(Home home,
ViewArray<View>& x,
ViewSel<View>* vs[n],
ValSelCommitBase<View,Val>* vsc,
SymmetryImp<View>** syms,
int nsyms,
BranchFilter<Var> bf,
VarValPrint<Var,Val> vvp);
};
template<class View, int n, class Val, unsigned int a>
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);
template<class View>
ModEvent prune(Space& home, View x, int v);
}}}
#include <gecode/int/ldsb/brancher.hpp>
#include <gecode/int/ldsb/sym-imp.hpp>
#endif
// STATISTICS: int-branch
Gecode::ActorLink::Actor
friend class Actor
Definition core.hpp:590
Gecode::Archive
Archive representation
Definition archive.hpp:42
Gecode::ArgArray
Argument array for non-primitive types.
Definition array.hpp:691
Gecode::ArrayTraits< ArgArray< VarImpBase * > >::StorageType
ArgArray< VarImpBase * > StorageType
Definition ldsb.hh:87
Gecode::ArrayTraits< ArgArray< VarImpBase * > >::ArgsType
ArgArray< VarImpBase * > ArgsType
Definition ldsb.hh:89
Gecode::ArrayTraits< ArgArray< VarImpBase * > >::ValueType
VarImpBase * ValueType
Definition ldsb.hh:88
Gecode::ArrayTraits< LiteralArgs >::StorageType
LiteralArgs StorageType
Definition ldsb.hh:98
Gecode::ArrayTraits< LiteralArgs >::ArgsType
LiteralArgs ArgsType
Definition ldsb.hh:100
Gecode::ArrayTraits< LiteralArgs >::ValueType
Int::LDSB::Literal ValueType
Definition ldsb.hh:99
Gecode::ArrayTraits
Traits of arrays in Gecode.
Definition array.hpp:94
Gecode::Brancher
Base-class for branchers.
Definition core.hpp:1442
Gecode::Brancher::Space
friend class Space
Definition core.hpp:1444
Gecode::Brancher::Choice
friend class Choice
Definition core.hpp:1445
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::IntArgs
Passing integer arguments.
Definition int.hh:628
Gecode::IntSet
Integer sets.
Definition int.hh:174
Gecode::Int::LDSB::LDSBBrancher::post
static void post(Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp)
Brancher post function.
Definition brancher.hpp:112
Gecode::Int::LDSB::LDSBBrancher::commit
virtual ExecStatus commit(Space &home, const Choice &c, unsigned int b)
Perform commit for choice c and alternative b.
Definition brancher.hpp:232
Gecode::Int::LDSB::LDSBBrancher::_nsyms
int _nsyms
Number of symmetry implementations.
Definition ldsb.hh:338
Gecode::Int::LDSB::LDSBBrancher::_syms
SymmetryImp< View > ** _syms
Array of symmetry implementations.
Definition ldsb.hh:336
Gecode::Int::LDSB::LDSBBrancher::choice
virtual const Choice * choice(Space &home)
Return choice.
Definition brancher.hpp:148
Gecode::Int::LDSB::LDSBBrancher::copy
virtual Actor * copy(Space &home)
Perform cloning.
Definition brancher.hpp:138
Gecode::Int::LDSB::LDSBBrancher::LDSBBrancher
LDSBBrancher(Space &home, LDSBBrancher &b)
Constructor for cloning b.
Gecode::Int::LDSB::LDSBBrancher::dispose
virtual size_t dispose(Space &home)
Delete brancher and return its size.
Definition brancher.hpp:267
Gecode::Int::LDSB::LDSBBrancher::LDSBBrancher
LDSBBrancher(Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter< Var > bf, VarValPrint< Var, Val > vvp)
Constructor for creation.
Gecode::Int::LDSB::LDSBBrancher::_prevPos
int _prevPos
Definition ldsb.hh:340
Gecode::Int::LDSB::LDSBChoice::nliterals
int nliterals(void) const
Return number of literals.
Definition brancher.hpp:76
Gecode::Int::LDSB::LDSBChoice::literals
const Literal * literals(void) const
Return literals.
Definition brancher.hpp:72
Gecode::Int::LDSB::LDSBChoice::LDSBChoice
LDSBChoice(const Brancher &b, unsigned int a, const Pos &p, const Val &n, const Literal *literals, int nliterals)
Initialize choice for brancher b, position p, value n, and set of literals literals (of size nliteral...
Definition brancher.hpp:59
Gecode::Int::LDSB::LDSBChoice::archive
virtual void archive(Archive &e) const
Archive into e.
Definition brancher.hpp:80
Gecode::Int::LDSB::Literal
A Literal is a pair of variable index and value.
Definition ldsb.hh:46
Gecode::Int::LDSB::Literal::operator<
bool operator<(const Literal &rhs) const
Less than. The ordering is the lexicographical order on the (variable,value) pair.
Definition brancher.hpp:49
Gecode::Int::LDSB::Literal::Literal
Literal(void)
Constructor for an empty literal.
Definition brancher.hpp:40
Gecode::Int::LDSB::Literal::_variable
int _variable
Variable index. The ViewArray that the index is meant for is assumed to be known by context.
Definition ldsb.hh:55
Gecode::Int::LDSB::Literal::_value
int _value
The value of the literal. For int and bool variables, this is the value itself; for set variables,...
Definition ldsb.hh:59
Gecode::Int::LDSB::SymmetryImp
Implementation of a single symmetry.
Definition ldsb.hh:162
Gecode::Int::LDSB::SymmetryImp::symmetric
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const =0
Compute symmetric literals.
Gecode::Int::LDSB::SymmetryImp::dispose
virtual size_t dispose(Space &home)=0
Disposal.
Gecode::Int::LDSB::SymmetryImp::update
virtual void update(Literal)=0
Left-branch update.
Gecode::Int::LDSB::SymmetryImp::~SymmetryImp
virtual ~SymmetryImp(void)
Unused destructor.
Definition sym-imp.hpp:48
Gecode::Int::LDSB::SymmetryImp::copy
virtual SymmetryImp< View > * copy(Space &home) const =0
Copy function.
Gecode::Int::LDSB::SymmetryObject::nrefs
int nrefs
Number of references that point to this symmetry object.
Definition ldsb.hh:109
Gecode::Int::LDSB::SymmetryObject::SymmetryObject
SymmetryObject(void)
Default constructor.
Definition sym-obj.cpp:76
Gecode::Int::LDSB::ValueSequenceSymmetryImp::symmetric
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
Gecode::Int::LDSB::ValueSequenceSymmetryImp::n_seqs
unsigned int n_seqs
Number of sequences in symmetry.
Definition ldsb.hh:275
Gecode::Int::LDSB::ValueSequenceSymmetryImp::getVal
int getVal(unsigned int sequence, unsigned int position) const
Get the value in the specified sequence at the specified position. (Both are zero-based....
Definition sym-imp.hpp:287
Gecode::Int::LDSB::ValueSequenceSymmetryImp::values
int * values
Set of sequences.
Definition ldsb.hh:269
Gecode::Int::LDSB::ValueSequenceSymmetryImp::copy
SymmetryImp< View > * copy(Space &home) const
Copy function.
Definition sym-imp.hpp:349
Gecode::Int::LDSB::ValueSequenceSymmetryImp::seq_size
unsigned int seq_size
Size of each sequence in symmetry.
Definition ldsb.hh:273
Gecode::Int::LDSB::ValueSequenceSymmetryImp::update
void update(Literal)
Left-branch update.
Definition sym-imp.hpp:326
Gecode::Int::LDSB::ValueSequenceSymmetryImp::dispose
virtual size_t dispose(Space &home)
Disposal.
Definition sym-imp.hpp:318
Gecode::Int::LDSB::ValueSequenceSymmetryImp::dead_sequences
Support::BitSet< Space > dead_sequences
Which sequences are dead.
Definition ldsb.hh:277
Gecode::Int::LDSB::ValueSequenceSymmetryImp::n_values
unsigned int n_values
Total number of values (n_seqs * seq_size).
Definition ldsb.hh:271
Gecode::Int::LDSB::ValueSequenceSymmetryObject::values
IntArgs values
Array of values in symmetry.
Definition ldsb.hh:153
Gecode::Int::LDSB::ValueSequenceSymmetryObject::seq_size
int seq_size
Size of each sequence in symmetry.
Definition ldsb.hh:155
Gecode::Int::LDSB::ValueSequenceSymmetryObject::ValueSequenceSymmetryObject
ValueSequenceSymmetryObject(IntArgs vs, int ss)
Constructor for creation.
Definition sym-obj.cpp:105
Gecode::Int::LDSB::ValueSymmetryImp::dispose
virtual size_t dispose(Space &home)
Disposal.
Definition sym-imp.hpp:150
Gecode::Int::LDSB::ValueSymmetryImp::copy
SymmetryImp< View > * copy(Space &home) const
Copy function.
Definition sym-imp.hpp:165
Gecode::Int::LDSB::ValueSymmetryImp::ValueSymmetryImp
ValueSymmetryImp(Space &home, int *vs, unsigned int n)
Constructor for creation.
Definition sym-imp.hpp:122
Gecode::Int::LDSB::ValueSymmetryImp::values
Support::BitSetOffset< Space > values
Symmetric values.
Definition ldsb.hh:207
Gecode::Int::LDSB::ValueSymmetryImp::update
void update(Literal)
Left-branch update.
Definition sym-imp.hpp:158
Gecode::Int::LDSB::ValueSymmetryImp::symmetric
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
Gecode::Int::LDSB::ValueSymmetryObject::values
IntSet values
Set of symmetric values.
Definition ldsb.hh:131
Gecode::Int::LDSB::ValueSymmetryObject::ValueSymmetryObject
ValueSymmetryObject(IntSet vs)
Constructor for creation.
Definition sym-obj.cpp:90
Gecode::Int::LDSB::VariableSequenceSymmetryImp::VariableSequenceSymmetryImp
VariableSequenceSymmetryImp(Space &home, int *_indices, unsigned int n, unsigned int seqsize)
Constructor for creation.
Definition sym-imp.hpp:180
Gecode::Int::LDSB::VariableSequenceSymmetryImp::indices
unsigned int * indices
Array of variable indices.
Definition ldsb.hh:227
Gecode::Int::LDSB::VariableSequenceSymmetryImp::getVal
int getVal(unsigned int sequence, unsigned int position) const
Get the value in the specified sequence at the specified position. (Both are zero-based....
Definition sym-imp.hpp:174
Gecode::Int::LDSB::VariableSequenceSymmetryImp::dispose
virtual size_t dispose(Space &home)
Disposal.
Definition sym-imp.hpp:216
Gecode::Int::LDSB::VariableSequenceSymmetryImp::copy
SymmetryImp< View > * copy(Space &home) const
Copy function.
Definition sym-imp.hpp:278
Gecode::Int::LDSB::VariableSequenceSymmetryImp::seq_size
unsigned int seq_size
Size of each sequence in symmetry.
Definition ldsb.hh:231
Gecode::Int::LDSB::VariableSequenceSymmetryImp::lookup
int * lookup
Map from variable's index to its sequence and position.
Definition ldsb.hh:242
Gecode::Int::LDSB::VariableSequenceSymmetryImp::update
void update(Literal)
Search left-branch update.
Definition sym-imp.hpp:270
Gecode::Int::LDSB::VariableSequenceSymmetryImp::lookup_size
unsigned int lookup_size
Size of lookup.
Definition ldsb.hh:244
Gecode::Int::LDSB::VariableSequenceSymmetryImp::n_indices
unsigned int n_indices
Total number of indices (n_seqs * seq_size).
Definition ldsb.hh:229
Gecode::Int::LDSB::VariableSequenceSymmetryImp::symmetric
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
Definition sym-imp.hpp:226
Gecode::Int::LDSB::VariableSequenceSymmetryImp::n_seqs
unsigned int n_seqs
Number of sequences in symmetry.
Definition ldsb.hh:233
Gecode::Int::LDSB::VariableSequenceSymmetryObject::seq_size
int seq_size
Size of each sequence in symmetry.
Definition ldsb.hh:143
Gecode::Int::LDSB::VariableSequenceSymmetryObject::nxs
int nxs
Number of variables in symmetry.
Definition ldsb.hh:141
Gecode::Int::LDSB::VariableSequenceSymmetryObject::xs
VarImpBase ** xs
Array of variables in symmetry.
Definition ldsb.hh:139
Gecode::Int::LDSB::VariableSequenceSymmetryObject::VariableSequenceSymmetryObject
VariableSequenceSymmetryObject(ArgArray< VarImpBase * > vars, int ss)
Constructor for creation.
Definition sym-obj.cpp:94
Gecode::Int::LDSB::VariableSymmetryImp::VariableSymmetryImp
VariableSymmetryImp(Space &home, int *vs, unsigned int n)
Constructor for creation.
Definition sym-imp.hpp:66
Gecode::Int::LDSB::VariableSymmetryImp::update
void update(Literal)
Left-branch update.
Definition sym-imp.hpp:104
Gecode::Int::LDSB::VariableSymmetryImp::copy
SymmetryImp< View > * copy(Space &home) const
Copy function.
Definition sym-imp.hpp:112
Gecode::Int::LDSB::VariableSymmetryImp::indices
Support::BitSetOffset< Space > indices
Symmetric variable indices.
Definition ldsb.hh:186
Gecode::Int::LDSB::VariableSymmetryImp::dispose
virtual size_t dispose(Space &home)
Disposal.
Definition sym-imp.hpp:96
Gecode::Int::LDSB::VariableSymmetryImp::symmetric
virtual ArgArray< Literal > symmetric(Literal, const ViewArray< View > &) const
Compute symmetric literals.
Gecode::Int::LDSB::VariableSymmetryObject::nxs
int nxs
Number of variables in symmetry.
Definition ldsb.hh:121
Gecode::Int::LDSB::VariableSymmetryObject::VariableSymmetryObject
VariableSymmetryObject(ArgArray< VarImpBase * > vars)
Constructor for creation.
Definition sym-obj.cpp:80
Gecode::Int::LDSB::VariableSymmetryObject::xs
VarImpBase ** xs
Array of variables in symmetry.
Definition ldsb.hh:119
Gecode::PosValChoice::PosValChoice
PosValChoice(const Brancher &b, unsigned int a, const Pos &p, const Val &n)
Initialize choice for brancher b, number of alternatives a, position p, and value n.
Definition view-val.hpp:159
Gecode::Pos
Position information.
Definition view.hpp:44
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::Support::BitSetOffset
Bitsets with index offset.
Definition bitset-offset.hpp:51
Gecode::Support::BitSet
Simple bitsets.
Definition bitset.hpp:45
Gecode::Val
Gecode::View
Gecode::VarImpBase
Base-class for variable implementations.
Definition core.hpp:172
Gecode::ViewArray
View arrays.
Definition array.hpp:253
Gecode::ViewBrancher::x
ViewArray< View > x
Views to branch on.
Definition view.hpp:83
Gecode::ViewBrancher::vs
ViewSel< View > * vs[n]
View selection objects.
Definition view.hpp:87
Gecode::ViewSel
Abstract class for view selection.
Definition view-sel.hpp:44
Gecode::ViewValBrancher::Var
View::VarType Var
The corresponding variable.
Definition view-val.hpp:97
Gecode::ViewValBrancher::ViewValBrancher
ViewValBrancher(Space &home, ViewValBrancher &b)
Constructor for cloning b.
Gecode::ViewValBrancher::vsc
ValSelCommitBase< View, Val > * vsc
Value selection and commit object.
Definition view-val.hpp:99
int.hh
GECODE_INT_EXPORT
#define GECODE_INT_EXPORT
Definition int.hh:81
brancher.hpp
Gecode::Int::LDSB
Symmetry breaking for integer variables.
Definition int.hh:5246
Gecode::Int::LDSB::findVar
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.
Definition ldsb.cpp:42
Gecode::Int::LDSB::prune
ModEvent prune(Space &home, View x, int v)
Exclude value \v from variable view \x.
Gecode::Int::LDSB::postldsbbrancher
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.
Definition brancher.hpp:275
Gecode::Int
Finite domain integers.
Gecode
Gecode toplevel namespace
Gecode::VarValPrint
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.
Definition print.hpp:40
Gecode::sequence
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition sequence.cpp:47
Gecode::ExecStatus
ExecStatus
Definition core.hpp:472
Gecode::LiteralArgs
ArgArray< Int::LDSB::Literal > LiteralArgs
An array of literals.
Definition ldsb.hh:93
Gecode::BranchFilter
std::function< bool(const Space &home, Var x, int i)> BranchFilter
Function type for branch filter functions.
Definition filter.hpp:40
Gecode::ModEvent
int ModEvent
Type for modification events.
Definition core.hpp:62
GECODE_VTABLE_EXPORT
#define GECODE_VTABLE_EXPORT
Definition support.hh:72
sym-imp.hpp