Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Test::Branch::IntTestSpace Class Reference

Space for executing integer tests. More...

Public Member Functions

 IntTestSpace (int n, Gecode::IntSet &d)
 Initialize test space.
 
 IntTestSpace (IntTestSpace &s)
 Constructor for cloning s.
 
virtual Gecode::Spacecopy (void)
 Copy space during cloning.
 
- Public Member Functions inherited from Gecode::Space
 Space (void)
 Default constructor.
 
 Space (Space &s)
 Constructor for cloning.
 
virtual ~Space (void)
 Destructor.
 
virtual void constrain (const Space &best)
 Constrain function for best solution search.
 
virtual bool master (const MetaInfo &mi)
 Master configuration function for meta search engines.
 
virtual bool slave (const MetaInfo &mi)
 Slave configuration function for meta search engines.
 
SpaceStatus status (StatusStatistics &stat=unused_status)
 Query space status.
 
const Choicechoice (void)
 Create new choice for current brancher.
 
const Choicechoice (Archive &e) const
 Create new choice from e.
 
Spaceclone (CloneStatistics &stat=unused_clone) const
 Clone space.
 
void commit (const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
 Commit choice c for alternative a.
 
void trycommit (const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
 If possible, commit choice c for alternative a.
 
NGLngl (const Choice &c, unsigned int a)
 Create no-good literal for choice c and alternative a.
 
void print (const Choice &c, unsigned int a, std::ostream &o) const
 Print branch for choice c and alternative a.
 
void notice (Actor &a, ActorProperty p, bool duplicate=false)
 Notice actor property.
 
void ignore (Actor &a, ActorProperty p, bool duplicate=false)
 Ignore actor property.
 
ExecStatus ES_SUBSUMED (Propagator &p)
 
ExecStatus ES_SUBSUMED_DISPOSED (Propagator &p, size_t s)
 Propagator p is subsumed
 
ExecStatus ES_FIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has computed partial fixpoint
 
ExecStatus ES_NOFIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has not computed partial fixpoint
 
template<class A >
ExecStatus ES_FIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed
 
template<class A >
ExecStatus ES_NOFIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed and its propagator must be run
 
template<class A >
ExecStatus ES_NOFIX_DISPOSE_FORCE (Council< A > &c, A &a)
 Advisor a must be disposed and its propagator must be forcefully rescheduled
 
void fail (void)
 Fail space.
 
bool failed (void) const
 Check whether space is failed.
 
bool stable (void) const
 Return if space is stable (at fixpoint or failed)
 
Home operator() (Propagator &p)
 Return a home for this space with the information that p is being rewritten.
 
Home operator() (PropagatorGroup pg)
 Return a home for this space with propagator group information pg.
 
Home operator() (BrancherGroup bg)
 Return a home for this space with brancher group information bg.
 
template<class T >
T * alloc (long unsigned int n)
 Allocate block of n objects of type T from space heap.
 
template<class T >
T * alloc (long int n)
 Allocate block of n objects of type T from space heap.
 
template<class T >
T * alloc (unsigned int n)
 Allocate block of n objects of type T from space heap.
 
template<class T >
T * alloc (int n)
 Allocate block of n objects of type T from space heap.
 
template<class T >
void free (T *b, long unsigned int n)
 Delete n objects allocated from space heap starting at b.
 
template<class T >
void free (T *b, long int n)
 Delete n objects allocated from space heap starting at b.
 
template<class T >
void free (T *b, unsigned int n)
 Delete n objects allocated from space heap starting at b.
 
template<class T >
void free (T *b, int n)
 Delete n objects allocated from space heap starting at b.
 
template<class T >
T * realloc (T *b, long unsigned int n, long unsigned int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
 
template<class T >
T * realloc (T *b, long int n, long int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
 
template<class T >
T * realloc (T *b, unsigned int n, unsigned int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
 
template<class T >
T * realloc (T *b, int n, int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
 
template<class T >
T ** realloc (T **b, long unsigned int n, long unsigned int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
 
template<class T >
T ** realloc (T **b, long int n, long int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
 
template<class T >
T ** realloc (T **b, unsigned int n, unsigned int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
 
template<class T >
T ** realloc (T **b, int n, int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
 
void * ralloc (size_t s)
 Allocate memory on space heap.
 
void rfree (void *p, size_t s)
 Free memory previously allocated with alloc (might be reused later)
 
void * rrealloc (void *b, size_t n, size_t m)
 Reallocate memory block starting at b from size n to size s.
 
template<size_t >
void * fl_alloc (void)
 Allocate from freelist-managed memory.
 
template<size_t >
void fl_dispose (FreeList *f, FreeList *l)
 Return freelist-managed memory to freelist.
 
template<class T >
T & construct (void)
 Construction routines.
 
template<class T , typename A1 >
T & construct (A1 const &a1)
 Constructs a single object of type T from space heap using a unary constructor.
 
template<class T , typename A1 , typename A2 >
T & construct (A1 const &a1, A2 const &a2)
 Constructs a single object of type T from space heap using a binary constructor.
 
template<class T , typename A1 , typename A2 , typename A3 >
T & construct (A1 const &a1, A2 const &a2, A3 const &a3)
 Constructs a single object of type T from space heap using a ternary constructor.
 
template<class T , typename A1 , typename A2 , typename A3 , typename A4 >
T & construct (A1 const &a1, A2 const &a2, A3 const &a3, A4 const &a4)
 Constructs a single object of type T from space heap using a quaternary constructor.
 
template<class T , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
T & construct (A1 const &a1, A2 const &a2, A3 const &a3, A4 const &a4, A5 const &a5)
 Constructs a single object of type T from space heap using a quinary constructor.
 
void afc_decay (double d)
 Set AFC decay factor to d
 
double afc_decay (void) const
 Return AFC decay factor.
 
void afc_unshare (void)
 Unshare AFC information for all propagators.
 

Public Attributes

Gecode::IntVarArray x
 Variables to be tested.
 
Gecode::IntVarBranch vara
 Variable selection criteria.
 
Gecode::IntVarBranch varb
 
Gecode::IntValBranch val
 Varlue selection criterion.
 
- Public Attributes inherited from Gecode::Space

Collection of possible arguments for integer branchers

BoolTestSpace

const char * int_var_branch_name []
 Names for integer variable selections.
 
const int n_int_var_branch
 Number of integer variable selections.
 
const char * bool_var_branch_name []
 Names for Boolean variable selections.
 
const int n_bool_var_branch
 Number of integer variable selections.
 
const char * int_val_branch_name []
 Names for integer value selections.
 
const int n_int_val_branch
 Number of integer value selections.
 
const char * bool_val_branch_name []
 Names for Boolean value selections.
 
const int n_bool_val_branch
 Number of Boolean value selections.
 
double int_merit (const Gecode::Space &, Gecode::IntVar x, int)
 Test function for branch merit function.
 
double bool_merit (const Gecode::Space &, Gecode::BoolVar x, int)
 Test function for branch merit function.
 
int int_val (const Gecode::Space &, Gecode::IntVar x, int)
 Test function for branch value function.
 
int bool_val (const Gecode::Space &, Gecode::BoolVar x, int)
 Test function for branch value function.
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management.
 
static void operator delete (void *p)
 Free memory allocated from heap.
 

Detailed Description

Space for executing integer tests.

Definition at line 66 of file branch.cpp.

Constructor & Destructor Documentation

◆ IntTestSpace() [1/2]

Test::Branch::IntTestSpace::IntTestSpace ( int n,
Gecode::IntSet & d )
inline

Initialize test space.

Definition at line 75 of file branch.cpp.

◆ IntTestSpace() [2/2]

Test::Branch::IntTestSpace::IntTestSpace ( IntTestSpace & s)
inline

Constructor for cloning s.

Definition at line 80 of file branch.cpp.

Member Function Documentation

◆ copy()

virtual Gecode::Space * Test::Branch::IntTestSpace::copy ( void )
inlinevirtual

Copy space during cloning.

Implements Gecode::Space.

Definition at line 85 of file branch.cpp.

Friends And Related Symbol Documentation

◆ int_var_branch_name

const char* int_var_branch_name[]
related

Names for integer variable selections.

Definition at line 157 of file branch.cpp.

◆ n_int_var_branch

const int n_int_var_branch
related
Initial value:
=
sizeof(int_var_branch_name)/sizeof(const char*)
const char * int_var_branch_name[]
Names for integer variable selections.
Definition branch.cpp:157

Number of integer variable selections.

Definition at line 191 of file branch.cpp.

◆ bool_var_branch_name

const char* bool_var_branch_name[]
related
Initial value:
= {
"SINGLE VARIABLE",
"BOOL_VAR_NONE",
"BOOL_VAR_RND",
"BOOL_VAR_MERIT_MIN",
"BOOL_VAR_MERIT_MAX",
"BOOL_VAR_DEGREE_MIN",
"BOOL_VAR_DEGREE_MAX",
"BOOL_VAR_AFC_MIN",
"BOOL_VAR_AFC_MAX",
"BOOL_VAR_ACTION_MIN",
"BOOL_VAR_ACTION_MAX",
"BOOL_VAR_CHB_MIN",
"BOOL_VAR_CHB_MAX"
}

Names for Boolean variable selections.

Definition at line 194 of file branch.cpp.

◆ n_bool_var_branch

const int n_bool_var_branch
related
Initial value:
=
sizeof(bool_var_branch_name)/sizeof(const char*)
const char * bool_var_branch_name[]
Names for Boolean variable selections.
Definition branch.cpp:194

Number of integer variable selections.

Definition at line 210 of file branch.cpp.

◆ int_val_branch_name

const char* int_val_branch_name[]
related
Initial value:
= {
"INT_VAL_MIN",
"INT_VAL_MED",
"INT_VAL_MAX",
"INT_VAL_RND",
"INT_VAL_SPLIT_MIN",
"INT_VAL_SPLIT_MAX",
"INT_VAL_RANGE_MIN",
"INT_VAL_RANGE_MAX",
"INT_VAL",
"INT_VALUES_MIN",
"INT_VALUES_MAX"
}

Names for integer value selections.

Definition at line 221 of file branch.cpp.

◆ n_int_val_branch

const int n_int_val_branch
related
Initial value:
=
sizeof(int_val_branch_name)/sizeof(const char*)
const char * int_val_branch_name[]
Names for integer value selections.
Definition branch.cpp:221

Number of integer value selections.

Definition at line 235 of file branch.cpp.

◆ bool_val_branch_name

const char* bool_val_branch_name[]
related
Initial value:
= {
"BOOL_VAL_MIN",
"BOOL_VAL_MAX",
"BOOL_VAL_RND",
"BOOL_VAL"
}

Names for Boolean value selections.

Definition at line 238 of file branch.cpp.

◆ n_bool_val_branch

const int n_bool_val_branch
related
Initial value:
=
sizeof(bool_val_branch_name)/sizeof(const char*)
const char * bool_val_branch_name[]
Names for Boolean value selections.
Definition branch.cpp:238

Number of Boolean value selections.

Definition at line 245 of file branch.cpp.

◆ int_merit()

double int_merit ( const Gecode::Space & ,
Gecode::IntVar x,
int  )
related

Test function for branch merit function.

Definition at line 213 of file branch.cpp.

◆ bool_merit()

double bool_merit ( const Gecode::Space & ,
Gecode::BoolVar x,
int  )
related

Test function for branch merit function.

Definition at line 217 of file branch.cpp.

◆ int_val()

int int_val ( const Gecode::Space & ,
Gecode::IntVar x,
int  )
related

Test function for branch value function.

Definition at line 248 of file branch.cpp.

◆ bool_val()

int bool_val ( const Gecode::Space & ,
Gecode::BoolVar x,
int  )
related

Test function for branch value function.

Definition at line 252 of file branch.cpp.

Member Data Documentation

◆ x

Gecode::IntVarArray Test::Branch::IntTestSpace::x

Variables to be tested.

Definition at line 69 of file branch.cpp.

◆ vara

Gecode::IntVarBranch Test::Branch::IntTestSpace::vara

Variable selection criteria.

Definition at line 71 of file branch.cpp.

◆ varb

Gecode::IntVarBranch Test::Branch::IntTestSpace::varb

Definition at line 71 of file branch.cpp.

◆ val

Gecode::IntValBranch Test::Branch::IntTestSpace::val

Varlue selection criterion.

Definition at line 73 of file branch.cpp.


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