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

An iterator in best-first order. More...

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

Classes

class  Assignment
 Class containing a single assignment with its utility. More...
class  MaximizeComp
 Comparator used when maximizing. More...
class  MinimizeComp
 Comparator used when minimizing. More...

Public Member Functions

 HyperCubeIterBestFirst (BasicHypercube< V, U > space, boolean maximize)
 Constructor.
V[] nextSolution ()
nextUtility ()
void setCurrentUtility (U util)
maximalCut ()
Public Member Functions inherited from frodo2.solutionSpaces.hypercube.HypercubeIter< V, U >
 HypercubeIter ()
 Constructor.
nextUtility (U bound, final boolean minimize)
getCurrentUtility (U bound, final boolean minimize)
Public Member Functions inherited from frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.SparseIterator< V, U >
nextUtility (U bound, boolean minimize)
 Returns the next solution strictly better than the input bound.
getCurrentUtility (U bound, boolean minimize)
Public Member Functions inherited from frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.SparseIterator< V, U >
getCurrentUtility ()
Public Member Functions inherited from frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >
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 ()

Private Member Functions

void indexToAssignment (int index)
 Given the index in the utility array, this method computes the corresponding value assignment.

Private Attributes

PriorityQueue< Assignment< U > > orderedAssignments
 Ordered list of assignment.
int[] indexSteps
 Array used to calculate assignment based on index in utility array.

Detailed Description

An iterator in best-first order.

Author
Brammert Ottens, 20 nov 2009
Parameters
<V>type used for domain values
<U>type used for utility values

Constructor & Destructor Documentation

◆ HyperCubeIterBestFirst()

frodo2.solutionSpaces.hypercube.HyperCubeIterBestFirst< V extends Addable< V >, U extends Addable< U > >.HyperCubeIterBestFirst ( BasicHypercube< V, U > space,
boolean maximize )

Constructor.

Parameters
spacethe BasicHypercube to iterate over
maximizetrue when values are to be ordered decreasingly, and false otherwise

References HyperCubeIterBestFirst(), indexSteps, and orderedAssignments.

Referenced by HyperCubeIterBestFirst().

Here is the call graph for this function:

Member Function Documentation

◆ indexToAssignment()

void frodo2.solutionSpaces.hypercube.HyperCubeIterBestFirst< V extends Addable< V >, U extends Addable< U > >.indexToAssignment ( int index)
private

Given the index in the utility array, this method computes the corresponding value assignment.

Author
Brammert Ottens, 23 nov 2009
Parameters
indexthe index in the utility array

References indexSteps.

Referenced by nextSolution(), and nextUtility().

◆ maximalCut()

◆ nextSolution()

◆ nextUtility()

◆ setCurrentUtility()

Member Data Documentation

◆ indexSteps

int [] frodo2.solutionSpaces.hypercube.HyperCubeIterBestFirst< V extends Addable< V >, U extends Addable< U > >.indexSteps
private

Array used to calculate assignment based on index in utility array.

Referenced by HyperCubeIterBestFirst(), and indexToAssignment().

◆ orderedAssignments

PriorityQueue<Assignment<U> > frodo2.solutionSpaces.hypercube.HyperCubeIterBestFirst< V extends Addable< V >, U extends Addable< U > >.orderedAssignments
private

Ordered list of assignment.

Referenced by HyperCubeIterBestFirst().


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