|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A solution iterator for a scalar space. More...

Public Member Functions | |
| ScalarBasicSpaceIter (U utility, U infeasibleUtil, U skippedUtil) | |
| Constructor. | |
| long | getNbrSolutions () |
| V[] | nextSolution () |
| U | nextUtility () |
| V[] | getCurrentSolution () |
| U | getCurrentUtility () |
| void | setCurrentUtility (U util) |
| Sets the utility of the current solution. | |
| String[] | getVariablesOrder () |
| V[][] | getDomains () |
| boolean | hasNext () |
| void | update () |
Protected Member Functions | |
| ScalarBasicSpaceIter () | |
| Empty constructor. | |
| ScalarBasicSpaceIter (U utility, String[] variables, V[][] domains, V[] assignment, U infeasibleUtil, U skippedUtil) | |
| Constructor. | |
| void | init (U utility, String[] variables, V[][] domains, V[] assignment) |
| Helper method called by the constructor. | |
| void | iter () |
| Moves to the next solution. | |
Protected Attributes | |
| U | utility |
| Current utility value. | |
| V[] | solution |
| Current variable assignments. | |
| long | nbrSolLeft = 1 |
| The number of solutions left to iterate over. | |
| U | skippedUtil |
| The utility value that should be skipped, if any. | |
| U | inf |
| The infeasible utility. | |
Private Attributes | |
| 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 | nbrSols = 1 |
| The total number of solutions to iterate over. | |
A solution iterator for a scalar space.
| <V> | the type used for variable values |
| <U> | the type used for utility values |
|
protected |
Empty constructor.
| frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.ScalarBasicSpaceIter | ( | U | utility, |
| U | infeasibleUtil, | ||
| U | skippedUtil ) |
Constructor.
| utility | the utility value |
| infeasibleUtil | the infeasible utility |
| skippedUtil | the utility value that should be skipped, if any |
References skippedUtil, and utility.
|
protected |
Constructor.
| utility | the utility value |
| variables | the variables to iterate over; may include variables not in the space |
| domains | the variables' domains |
| assignment | An array that will be used as the output of nextSolution() |
| infeasibleUtil | the infeasible utility |
| skippedUtil | the utility value that should be skipped, if any |
References domains, init(), skippedUtil, utility, and variables.

| V[] frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.getCurrentSolution | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >.
| U frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.getCurrentUtility | ( | ) |
| V[][] frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.getDomains | ( | ) |
| long frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.getNbrSolutions | ( | ) |
| String[] frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.getVariablesOrder | ( | ) |
| boolean frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.hasNext | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >.
Referenced by frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.blindProjectAll(), frodo2.benchmarks.party.PartyGame.encodeProblem(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.project(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.projectAll(), frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >.readExternal(), and frodo2.solutionSpaces.JaCoP.JaCoPoptAssignments.resolve().
|
protected |
Helper method called by the constructor.
| utility | the utility value |
| variables | the variables to iterate over; may include variables not in the space |
| domains | the variables' domains |
| assignment | An array that will be used as the output of nextSolution() |
References domains, init(), nbrSolLeft, nbrVars, solution, utility, valIndexes, and variables.
Referenced by init(), and ScalarBasicSpaceIter().

|
protected |
Moves to the next solution.
References solution, and valIndexes.
Referenced by nextSolution(), and nextUtility().
| V[] frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.nextSolution | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >.
References iter().
Referenced by frodo2.benchmarks.party.PartyGame.encodeProblem(), and frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >.readExternal().

| U frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.nextUtility | ( | ) |
| void frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.setCurrentUtility | ( | U | util | ) |
Sets the utility of the current solution.
| util | the new utility |
| void frodo2.solutionSpaces.hypercube.ScalarBasicSpaceIter< V extends Addable< V >, U extends Serializable >.update | ( | ) |
Implements frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.SparseIterator< V >.
|
private |
The variables' domains.
Referenced by init(), and ScalarBasicSpaceIter().
|
protected |
The infeasible utility.
|
protected |
The number of solutions left to iterate over.
Referenced by init().
|
private |
The total number of solutions to iterate over.
|
private |
The number of variables.
Referenced by init().
|
protected |
The utility value that should be skipped, if any.
Referenced by ScalarBasicSpaceIter(), and ScalarBasicSpaceIter().
|
protected |
|
protected |
Current utility value.
Referenced by init(), ScalarBasicSpaceIter(), and ScalarBasicSpaceIter().
|
private |
|
private |
The order of iteration over the variables.
Referenced by init(), and ScalarBasicSpaceIter().