FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.hypercube.HypercubeIter< V extends Addable< V >, U extends Addable< U > > Class Template Reference

An iterator for a Hypercube. More...

Inheritance diagram for frodo2.solutionSpaces.hypercube.HypercubeIter< V extends Addable< V >, U extends Addable< U > >:

Public Member Functions

 HypercubeIter ()
 Constructor.
nextUtility (U bound, final boolean minimize)
getCurrentUtility (U bound, final boolean minimize)
Public Member Functions inherited from frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >
long getNbrSolutions ()
V[] nextSolution ()
nextUtility ()
V[] getCurrentSolution ()
getCurrentUtility ()
void setCurrentUtility (U util)
 Sets the utility of the current solution.
String[] getVariablesOrder ()
V[][] getDomains ()
boolean hasNext ()
void update ()
String toString ()
Public Member Functions inherited from frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.SparseIterator< V, U >
nextUtility ()
getCurrentUtility ()
void setCurrentUtility (U util)
 Sets the utility of the current solution.
Public Member Functions inherited from frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >
V[] nextSolution ()
V[] getCurrentSolution ()
String[] getVariablesOrder ()
V[][] getDomains ()
void update ()
 It is supposed to be called if the solution space upon which the iterator is based has changed.
Public Member Functions inherited from frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >
long getNbrSolutions ()
boolean hasNext ()

Protected Member Functions

 HypercubeIter (BasicHypercube< V, U > space, String[] variables, V[][] domains, V[] assignment, U skippedUtil)
 Constructor.
 HypercubeIter (BasicHypercube< V, U > space, String[] varOrder, V[] assignment, U skippedUtil)
 Constructor.
 HypercubeIter (BasicHypercube< V, U > space, V[] assignment, U skippedUtil)
 Constructor.
Protected Member Functions inherited from frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >
 BasicHypercubeIter ()
 Empty constructor.
int iter ()
 Moves to the next solution.

Additional Inherited Members

Protected Attributes inherited from frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >
U[] utilities
 The space's utility array.
utility
 Current utility value.
int utilIndex
 The index of the current utility value in the utility array.
int[][] steps
 For each variable:
V[] solution
 Current variable assignments.
BasicHypercube< V, U > space
 The BasicHypercube we are iterating over.
String[] variables
 The order of iteration over the variables.
int nbrVars
 The number of variables.
V[][] domains
 The variables' domains.
int[] valIndexes
 For each variable, the index in its domain of the current assignment.
long nbrSolLeft
 The number of solutions left to iterate over.
long nbrSols
 The total number of solutions to iterate over.

Detailed Description

An iterator for a Hypercube.

Author
Thomas Leaute
Parameters
<V>the type used for variable values
<U>the type used for utility values

Constructor & Destructor Documentation

◆ HypercubeIter() [1/4]

Constructor.

◆ HypercubeIter() [2/4]

frodo2.solutionSpaces.hypercube.HypercubeIter< V extends Addable< V >, U extends Addable< U > >.HypercubeIter ( BasicHypercube< V, U > space,
String[] variables,
V domains[][],
V[] assignment,
U skippedUtil )
protected

Constructor.

Parameters
spacethe BasicHypercube to iterate over
variablesthe variables to iterate over; may include variables not in the space
domainsthe variables' domains
assignmentAn array that will be used as the output of nextSolution()
skippedUtilThe utility value to skip, if any
Warning
The input array of variables must contain all of the space's variables, and the input domains must be sub-domains of the space's.

References frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.domains, frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.skippedUtil, frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.space, and frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.variables.

◆ HypercubeIter() [3/4]

frodo2.solutionSpaces.hypercube.HypercubeIter< V extends Addable< V >, U extends Addable< U > >.HypercubeIter ( BasicHypercube< V, U > space,
String[] varOrder,
V[] assignment,
U skippedUtil )
protected

Constructor.

Parameters
spacethe BasicHypercube to iterate over
varOrderthe order of iteration of the variables
assignmentAn array that will be used as the output of nextSolution()
skippedUtilThe utility value to skip, if any
Warning
The input array of variables must contain exactly all of the space's variables.

References frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.skippedUtil, and frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.space.

◆ HypercubeIter() [4/4]

frodo2.solutionSpaces.hypercube.HypercubeIter< V extends Addable< V >, U extends Addable< U > >.HypercubeIter ( BasicHypercube< V, U > space,
V[] assignment,
U skippedUtil )
protected

Constructor.

Parameters
spacethe BasicHypercube to iterate over
assignmentAn array that will be used as the output of nextSolution()
skippedUtilThe utility value to skip, if any

References frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.skippedUtil, and frodo2.solutionSpaces.hypercube.BasicHypercubeIter< V, U >.space.

Member Function Documentation

◆ getCurrentUtility()

◆ nextUtility()

U frodo2.solutionSpaces.hypercube.HypercubeIter< V extends Addable< V >, U extends Addable< U > >.nextUtility ( U bound,
final boolean minimize )
See also
Iterator.nextUtility(java.lang.Object, boolean)

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