|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
This interface defines common functionalities in all solution spaces. More...

Classes | |
| interface | SparseIterator |
| A SolutionSpace iterator that skips infeasible solutions. More... | |
| interface | Iterator |
| An iterator that does NOT skip infeasible solutions. More... | |
Public Member Functions | |
| void | setProblem (ProblemInterface< V, ?> problem) |
| Sets the problem that should be notified of constraint checks. | |
| boolean | countsCCs () |
| String | getName () |
| void | setName (String name) |
| Sets the name of this space. | |
| String | getRelationName () |
| void | setRelationName (String name) |
| Sets the name of the underlying relation for this space. | |
| String | getOwner () |
| void | setOwner (String owner) |
| Sets the owner. | |
| long | getNumberOfSolutions () |
| Returns the number of solutions in the SolutionSpace. | |
| String[] | getVariables () |
| Returns the internal order of variables used within the SolutionSpace. | |
| int | getNumberOfVariables () |
| Returns the number of variables in the SolutionSpace. | |
| String | getVariable (int index) |
| Returns the variable corresponding to the provided index. | |
| void | renameVariable (String oldName, String newName) |
| Renames a variable. | |
| SolutionSpace< V > | renameAllVars (String[] newVarNames) |
| Creates a shallow clone of this space, with different variable names. | |
| int | getIndex (String variable) |
| Returns the index of the input variable in this SolutionSpace. | |
| V[][] | getDomains () |
| Returns the array containing the domains of the variables. | |
| V[] | getDomain (String variable) |
| Returns an array of all possible values that the variable provided as a parameter can take in this SolutionSpace. | |
| V[] | getDomain (int index) |
| Returns the domain of the variable that corresponds to the provided index. | |
| V[] | getDomain (String variable, int index) |
Returns the variable's domain if index is the variable's index in the array of variables order. | |
| void | setDomain (String var, V[] dom) |
| Sets the domain of a variable. | |
| void | augment (V[] variables_values) |
| Augments the SolutionSpace with a new combination of variable values which constitutes a new solution. | |
| SolutionSpace< V > | slice (String[] variables_names, V[][] sub_domains) |
| Returns a slice of this SolutionSpace. | |
| SolutionSpace< V > | slice (String[] variables_names, V[] values) |
| Returns a slice of this SolutionSpace. | |
| SolutionSpace< V > | slice (String var, V[] subDomain) |
| Slices this SolutionSpace over a single variable. | |
| SolutionSpace< V > | slice (String var, V val) |
| Slices this SolutionSpace over a single variable-value assignment. | |
| SolutionSpace< V > | slice (V[] variables_values) |
| Returns a slice of this SolutionSpace. | |
| boolean | knows (Class<?> spaceClass) |
| Returns whether this space knows how to handle other spaces of the input class. | |
| SolutionSpace< V > | join (SolutionSpace< V > space, String[] total_variables) |
| Returns a SolutionSpace object obtained by joining this SolutionSpace object with the one provided as a parameter. | |
| SolutionSpace< V > | join (SolutionSpace< V > space) |
| Computes the join of this SolutionSpace with the input SolutionSpace. | |
| SolutionSpace< V > | join (SolutionSpace< V >[] spaces, String[] total_variables_order) |
| Returns a SolutionSpace object obtained by joining the SolutionSpace for which this method is called and the SolutionSpaces present in the array of SolutionSpaces given to this method as a parameter. | |
| SolutionSpace< V > | join (SolutionSpace< V >[] spaces) |
| Returns a SolutionSpace object obtained by joining the SolutionSpace for which this method is called and the SolutionSpaces present in the array of SolutionSpaces given to this method as a parameter. | |
| boolean | equals (Object o) |
| Checks for equality. | |
| SolutionSpace< V > | clone () |
| SolutionSpace< V > | resolve () |
| SolutionSpace< V > | resolve (boolean sparse) |
| Returns an explicit representation of this space. | |
| SparseIterator< V > | sparseIter () |
| SparseIterator< V > | sparseIter (String[] order) |
| Returns a sparse iterator with a specific variable order. | |
| Iterator< V > | iterator () |
| Iterator< V > | iterator (String[] order) |
| Returns an iterator with a specific variable order. | |
This interface defines common functionalities in all solution spaces.
A solution space is a representation of combinations of assignments to variables that are the solution to some problem.
| <V> | the type used for variable values |
| void frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.augment | ( | V[] | variables_values | ) |
Augments the SolutionSpace with a new combination of variable values which constitutes a new solution.
| variables_values | the assignments to the solution space's variables |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.clone | ( | ) |
| boolean frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.countsCCs | ( | ) |
| boolean frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.equals | ( | Object | o | ) |
Checks for equality.
| o | an Object to be compared with this SolutionSpace |
| V[] frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getDomain | ( | int | index | ) |
Returns the domain of the variable that corresponds to the provided index.
| index | index of the variable |
| V[] frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getDomain | ( | String | variable | ) |
Returns an array of all possible values that the variable provided as a parameter can take in this SolutionSpace.
| variable | the name of the variable |
Referenced by frodo2.solutionSpaces.hypercube.BasicHypercube< V extends Addable< V >, U extends Serializable >.equivalent(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted().
| V[] frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getDomain | ( | String | variable, |
| int | index ) |
Returns the variable's domain if index is the variable's index in the array of variables order.
| variable | the name of the variable |
| index | the index of the variable |
null if the variable doesn't exist in this SolutionSpace at the provided index | V[][] frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getDomains | ( | ) |
Returns the array containing the domains of the variables.
| int frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getIndex | ( | String | variable | ) |
Returns the index of the input variable in this SolutionSpace.
| variable | the name of the variable |
| String frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getName | ( | ) |
| long frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getNumberOfSolutions | ( | ) |
Returns the number of solutions in the SolutionSpace.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.sendVALUEmessage(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted().
| int frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getNumberOfVariables | ( | ) |
Returns the number of variables in the SolutionSpace.
Referenced by frodo2.solutionSpaces.hypercube.BasicHypercube< V extends Addable< V >, U extends Serializable >.equivalent(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted().
| String frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getOwner | ( | ) |
null if the space is owned by all agents involved | String frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getRelationName | ( | ) |
| String frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getVariable | ( | int | index | ) |
Returns the variable corresponding to the provided index.
| index | index of the variable in this SolutionSpace |
| String[] frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getVariables | ( | ) |
Returns the internal order of variables used within the SolutionSpace.
It is used for any function which assumes default/internal order of variables.
Referenced by frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), frodo2.solutionSpaces.hypercube.BasicHypercube< V extends Addable< V >, U extends Serializable >.equals(), frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.sendVALUEmessage(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted().
| Iterator< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.iterator | ( | ) |
| Iterator< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.iterator | ( | String[] | order | ) |
Returns an iterator with a specific variable order.
| order | the order of iteration of the variables |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.join | ( | SolutionSpace< V > | space | ) |
Computes the join of this SolutionSpace with the input SolutionSpace.
Order of variables in the resulting SolutionSpace is not specified.
| space | the SolutionSpace to join with this one |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.join | ( | SolutionSpace< V > | space, |
| String[] | total_variables ) |
Returns a SolutionSpace object obtained by joining this SolutionSpace object with the one provided as a parameter.
| space | the SolutionSpace to join with this one |
| total_variables | the order of the variables to be used in the resulting SolutionSpace |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.join | ( | SolutionSpace< V >[] | spaces | ) |
Returns a SolutionSpace object obtained by joining the SolutionSpace for which this method is called and the SolutionSpaces present in the array of SolutionSpaces given to this method as a parameter.
The order of the variables in the resulting SolutionSpace is not defined.
| spaces | an array of the SolutionSpaces to be added to this SolutionSpace |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.join | ( | SolutionSpace< V >[] | spaces, |
| String[] | total_variables_order ) |
Returns a SolutionSpace object obtained by joining the SolutionSpace for which this method is called and the SolutionSpaces present in the array of SolutionSpaces given to this method as a parameter.
| spaces | an array of SolutionSpaces to be added to this SolutionSpace |
| total_variables_order | the order of variables to be used in the resulting SolutionSpace |
| boolean frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.knows | ( | Class<?> | spaceClass | ) |
Returns whether this space knows how to handle other spaces of the input class.
| spaceClass | class of the other spaces |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.renameAllVars | ( | String[] | newVarNames | ) |
Creates a shallow clone of this space, with different variable names.
| newVarNames | the new variable names |
| void frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.renameVariable | ( | String | oldName, |
| String | newName ) |
Renames a variable.
| oldName | the current name of the variable |
| newName | the new name for the variable |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.resolve | ( | ) |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.resolve | ( | boolean | sparse | ) |
Returns an explicit representation of this space.
| sparse | whether to use a sparse iterator to resolve the space |
| void frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.setDomain | ( | String | var, |
| V[] | dom ) |
Sets the domain of a variable.
| var | the variable |
| dom | the new domain for the variable |
| void frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.setName | ( | String | name | ) |
Sets the name of this space.
| name | the name of this space |
| void frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.setOwner | ( | String | owner | ) |
Sets the owner.
| owner | the owner of this space |
| void frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.setProblem | ( | ProblemInterface< V, ?> | problem | ) |
Sets the problem that should be notified of constraint checks.
| problem | the problem |
| void frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.setRelationName | ( | String | name | ) |
Sets the name of the underlying relation for this space.
| name | the name of the underlying relation for this space |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.slice | ( | String | var, |
| V | val ) |
Slices this SolutionSpace over a single variable-value assignment.
| var | the variable to be assigned a value |
| val | the value to assign to the variable |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.slice | ( | String | var, |
| V[] | subDomain ) |
Slices this SolutionSpace over a single variable.
| var | the variable to be assigned a value |
| subDomain | the new domain for this variable (must be a subset of the original domain) |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.slice | ( | String[] | variables_names, |
| V[] | values ) |
Returns a slice of this SolutionSpace.
Slicing corresponds to grounding some of the variables.
| variables_names | the variables to slice |
| values | the values for the variables |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.slice | ( | String[] | variables_names, |
| V | sub_domains[][] ) |
Returns a slice of this SolutionSpace.
Slicing corresponds to reducing the domains of some of the variables.
| variables_names | the variables to slice |
| sub_domains | the new domains for the variables |
| SolutionSpace< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.slice | ( | V[] | variables_values | ) |
Returns a slice of this SolutionSpace.
| variables_values | array containing values of the last variables of the SolutionSpace |
| SparseIterator< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.sparseIter | ( | ) |
| SparseIterator< V > frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.sparseIter | ( | String[] | order | ) |
Returns a sparse iterator with a specific variable order.
| order | the order of iteration of the variables |