FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube Class Reference

A JaCoP extensional constraint encoded by a hypercube for faster lookups. More...

Inheritance diagram for frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube:

Public Member Functions

 ExtensionalSupportHypercube (IntVarCloneable[] vars, int[][] tuples)
 Constructor.
HashSet< Var > arguments ()
void consistency (Store store)
int getConsistencyPruningEvent (Var arg0)
int getDefaultConsistencyPruningEvent ()
void impose (Store store)
void increaseWeight ()
void removeConstraint ()
String toString ()
ExtensionalSupportHypercube cloneInto (StoreCloneable targetStore) throws FailException

Private Member Functions

 ExtensionalSupportHypercube (IntVarCloneable[] vars, ArrayList< HashMap< Integer, Integer > > indexes)
 Private constructor that does not initialize the hypercube.
boolean checkIndexesVsHypercube ()
 Method used as an assert.

Private Attributes

IntVarCloneable[] vars
 The variables.
final int nbrVarsMin2
 this.vars.length - 2
Object hypercube
 The multi-dimensional array indicating the valuation of each possible tuple.
ArrayList< HashMap< Integer, Integer > > indexes
 For each variable (except the valuation variable), for each assignment in its domain, the index of this assignment in the domain.

Static Private Attributes

static int lastID = -1
 The ID assigned to the last instantiated object of this class.

Detailed Description

A JaCoP extensional constraint encoded by a hypercube for faster lookups.

Author
Thomas Leaute

Constructor & Destructor Documentation

◆ ExtensionalSupportHypercube() [1/2]

frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.ExtensionalSupportHypercube ( IntVarCloneable[] vars,
ArrayList< HashMap< Integer, Integer > > indexes )
private

Private constructor that does not initialize the hypercube.

Parameters
varsthe list of variables, the last being the utility variable
indexesror each variable (except the utility variable), for each value in its domain, the index of this value in the domain

References indexes, lastID, and vars.

Referenced by cloneInto().

◆ ExtensionalSupportHypercube() [2/2]

frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.ExtensionalSupportHypercube ( IntVarCloneable[] vars,
int tuples[][] )

Constructor.

Parameters
varsthe list of variables, the last being the valuation variable
tuplesthe list of allowed tuples

References checkIndexesVsHypercube(), nbrVarsMin2, and vars.

Here is the call graph for this function:

Member Function Documentation

◆ arguments()

HashSet< Var > frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.arguments ( )
See also
org.jacop.constraints.Constraint#arguments()

◆ checkIndexesVsHypercube()

boolean frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.checkIndexesVsHypercube ( )
private

Method used as an assert.

Returns
whether the indexes are consistent with the hypercube

Referenced by cloneInto(), and ExtensionalSupportHypercube().

◆ cloneInto()

ExtensionalSupportHypercube frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.cloneInto ( StoreCloneable targetStore) throws FailException

◆ consistency()

void frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.consistency ( Store store)
See also
org.jacop.constraints.Constraint#consistency(org.jacop.core.Store)
Todo
Propagate earlier
Todo
Propagate earlier

◆ getConsistencyPruningEvent()

int frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.getConsistencyPruningEvent ( Var arg0)
See also
org.jacop.constraints.Constraint#getConsistencyPruningEvent(org.jacop.core.Var)

Referenced by impose().

◆ getDefaultConsistencyPruningEvent()

int frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.getDefaultConsistencyPruningEvent ( )
See also
org.jacop.constraints.Constraint#getDefaultConsistencyPruningEvent()

◆ impose()

void frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.impose ( Store store)
See also
org.jacop.constraints.Constraint#impose(org.jacop.core.Store)

References getConsistencyPruningEvent().

Here is the call graph for this function:

◆ increaseWeight()

void frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.increaseWeight ( )
See also
org.jacop.constraints.Constraint#increaseWeight()

◆ removeConstraint()

void frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.removeConstraint ( )
See also
org.jacop.constraints.Constraint#removeConstraint()

◆ toString()

String frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.toString ( )
See also
org.jacop.constraints.Constraint#toString()

Member Data Documentation

◆ hypercube

Object frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.hypercube
private

The multi-dimensional array indicating the valuation of each possible tuple.

◆ indexes

ArrayList< HashMap<Integer, Integer> > frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.indexes
private

For each variable (except the valuation variable), for each assignment in its domain, the index of this assignment in the domain.

Referenced by ExtensionalSupportHypercube().

◆ lastID

int frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.lastID = -1
staticprivate

The ID assigned to the last instantiated object of this class.

Referenced by ExtensionalSupportHypercube().

◆ nbrVarsMin2

final int frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.nbrVarsMin2
private

this.vars.length - 2

Referenced by ExtensionalSupportHypercube().

◆ vars

IntVarCloneable [] frodo2.solutionSpaces.JaCoP.ExtensionalSupportHypercube.vars
private

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