|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A Hypercube whose utilities are AddableLimited's. More...

Public Member Functions | |
| HypercubeLimited () | |
| Empty constructor. | |
| HypercubeLimited (String[] variablesOrder, V[][] variablesDomains, UL[] utilityValues, UL infeasibleUtil) | |
| Constructor. | |
| HypercubeLimited (String name, String[] variablesOrder, V[][] variablesDomains, UL[] utilityValues, UL infeasibleUtil) | |
| Constructor. | |
| HypercubeLimited (String[] variablesOrder, V[][] variablesDomains, UL[] utilityValues, UL infeasibleUtil, ProblemInterface< V, U > problem) | |
| Constructor. | |
| HypercubeLimited< V, U, UL > | resolve () |
| HypercubeLimited< V, U, UL > | resolve (boolean unused) |
| HypercubeLimited< V, U, UL > | clone () |
| UtilitySolutionSpaceLimited< V, U, UL > | joinMinNCCCs (UtilitySolutionSpace< V, U > space) |
| UtilitySolutionSpaceLimited< V, U, UL > | join (UtilitySolutionSpace< V, U > space) |
| UtilitySolutionSpaceLimited< V, U, UL > | join (UtilitySolutionSpace< V, U > space, final boolean minNCCCs) |
| The join operation. | |
| UtilitySolutionSpaceLimited< V, U, UL > | blindProject (String varOut, boolean maximize) |
| UtilitySolutionSpaceLimited< V, U, UL > | blindProject (String[] varsOut, final boolean maximize) |
| UL | blindProjectAll (final boolean maximize) |
| UtilitySolutionSpaceLimited< V, U, UL > | min (String variable) |
| UtilitySolutionSpaceLimited< V, U, UL > | max (String variable) |
| HypercubeLimited< V, U, UL > | slice (String var, V val) |
| Public Member Functions inherited from frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL > | |
| BasicHypercube (String[] variables_order, V[][] variables_domains, U[] utility_values, U infeasibleUtil) | |
| Construct a new BasicHypercube with provided variables names, the domains of these variables and the utility values. | |
| void | writeExternal (ObjectOutput out) throws IOException |
| void | readExternal (ObjectInput in) throws IOException, ClassNotFoundException |
| void | setProblem (ProblemInterface< V, ?> problem) |
| boolean | countsCCs () |
| long | getNumberOfSolutions () |
| Returns the number of utility values in the hypercube. | |
| U | getUtility (V[] variables_values) |
| U | getUtilityValueSameOrder (String[] variables_names, V[] variables_values) |
| Returns an object representing the utility value corresponding to the provided variables values. | |
| Class< U > | getClassOfU () |
| boolean | setUtility (V[] variables_values, U utility) |
| Sets the utility value corresponding to a given assignment to variables. | |
| String[] | getVariables () |
| Returns the names of the variables of the hypercube. | |
| int | getNumberOfVariables () |
| Returns the number of variables in the hypercube. | |
| String | getVariable (int index) |
| Returns the variable corresponding to the provided index. | |
| void | renameVariable (String oldName, String newName) |
| BasicHypercube< V, U > | renameAllVars (String[] newVarNames) |
| int | getIndex (String variable) |
| Return the index of the input variable in this hypercube. | |
| V[][] | getDomains () |
| Returns the array containing the domains of the variables. | |
| V[] | getDomain (String variable) |
| Returns an array all the possible values that the variable provided as a parameter can take in this hypercube. | |
| void | setDomain (String var, V[] dom) |
| String | toString () |
| String | prettyPrint (U ignoredUtil) |
| boolean | isNull () |
| Check if this hypercube is the NULL hypercube. | |
| void | augment (V[] variables_values, U utility_value) |
| BasicHypercube< V, U > | changeVariablesOrder (String[] variables_order) |
| Return a new BasicHypercube by changing the order of the variables of the hypercube. | |
| void | applyChangeVariablesOrder (String[] variables_order) |
| Changes the variable order of the hypercube by reordering the current utility array. | |
| BasicHypercube< V, U > | applyAugment (String[] new_variables, V[][] new_domains) |
| Augments the hypercube by adding new variables at the beginning of its variables list. | |
| boolean | equivalent (final BasicUtilitySolutionSpace< V, U > space) |
| boolean | isIncludedIn (BasicUtilitySolutionSpace< V, U > space) |
| Iterator< V, U > | iterator () |
| SparseIterator< V, U > | sparseIter () |
| SolutionSpace< V > | join (SolutionSpace< V > space, String[] total_variables) |
| BasicHypercube< V, U > | slice (String[] variables_names, V[][] sub_domains) |
| Return a slice of this hypercube. | |
| BasicHypercube< V, U > | applySlice (String[] variables_names, V[][] sub_domains) |
| Return a slice of this hypercube this version of slice does not create a new hypercube but directly modifies the current utility array. | |
| boolean | equals (Object o) |
| int | hashCode () |
| BasicHypercube< V, U > | clone () |
| BasicHypercube< V, U > | resolve () |
| BasicUtilitySolutionSpace< V, U > | compose (final String[] varsOut, final BasicUtilitySolutionSpace< V, ArrayList< V > > subst) |
| The composition operation. | |
| boolean | orderedDomains () |
| checks that the domains of the hypercube are ordered | |
| U | getDefaultUtility () |
| void | setDefaultUtility (U utility) |
| void | setInfeasibleUtility (U utility) |
| boolean | knows (Class<?> spaceClass) |
| String | getName () |
| void | setName (String name) |
| String | getRelationName () |
| void | setRelationName (String name) |
| String | getOwner () |
| void | setOwner (String owner) |
| Sets the owner. | |
| Public Member Functions inherited from frodo2.solutionSpaces.BasicUtilitySolutionSpace< V, UL > | |
| BasicUtilitySolutionSpace< V, U > | clone () |
| BasicUtilitySolutionSpace< V, U > | resolve () |
| String | prettyPrint (U ignoredUtil) |
| A human-friendly version of toString(). | |
| U | getUtility (V[] variables_values) |
| Returns an object representing the utility value corresponding to the provided variables values representing a solution. | |
| Class< U > | getClassOfU () |
| boolean | setUtility (V[] variables_values, U utility) |
| Sets the utility value corresponding to a given assignment to variables. | |
| void | setDefaultUtility (U utility) |
| Sets the default utility value. | |
| U | getDefaultUtility () |
| void | setInfeasibleUtility (U utility) |
| Sets the utility associated with infeasible solutions. | |
| void | augment (V[] variables_values, U utility_value) |
| Augments this BasicUtilitySolutionSpace with a new combination of variables values associated with a given utility. | |
| boolean | equivalent (BasicUtilitySolutionSpace< V, U > space) |
| Returns whether the input BasicUtilitySolutionSpace represents the same space as this BasicUtilitySolutionSpace. | |
| boolean | isIncludedIn (BasicUtilitySolutionSpace< V, U > space) |
| Checks if this BasicUtilitySolutionSpace is included in the provided BasicUtilitySolutionSpace. | |
| BasicUtilitySolutionSpace< V, U > | changeVariablesOrder (String[] variables_order) |
| Returns a new BasicUtilitySolutionSpace by changing the order of the variables of this BasicUtilitySolutionSpace. | |
| BasicUtilitySolutionSpace< V, U > | slice (String[] variables_names, V[][] sub_domains) |
| Returns a slice of this BasicUtilitySolutionSpace. | |
| BasicUtilitySolutionSpace< V, U > | compose (String[] vars, BasicUtilitySolutionSpace< V, ArrayList< V > > substitution) |
| Substitutes some of the variables in this utility space with functions. | |
| SparseIterator< V, U > | sparseIter () |
| Iterator< V, U > | iterator () |
Protected Member Functions | |
| void | writeUtilities (ObjectOutput out) throws IOException |
| void | readUtilities (ObjectInput in) throws ClassNotFoundException, IOException, InvocationTargetException, NoSuchMethodException |
| HypercubeLimited< V, U, UL > | newInstance (String name, String[] new_variables, V[][] new_domains, UL[] new_values, UL infeasibleUtil) |
| HypercubeLimited< V, U, UL > | scalarHypercube (UL utility) |
| Protected Member Functions inherited from frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL > | |
| void | writeUtilities (ObjectOutput out) throws IOException |
| Serializes the utilities. | |
| void | readUtilities (ObjectInput in) throws ClassNotFoundException, IOException, InvocationTargetException, NoSuchMethodException |
| Deserializes the utilities. | |
| void | setNumberOfSolutions (int new_number_of_utilities) |
| Modifies the number of utility values in the hypercube (in case the utility array is bigger then the actual number of elements). | |
| void | incrNCCCs (long incr) |
| Increments the number of constraint checks. | |
| int | getIndexOfUtilityValue (V[] variables_values) |
| Returns the index of the utility value corresponding to the provided variables values. | |
| Iterator< V, U > | newIter (String[] variables, V[][] domains, V[] assignment, final U skippedUtil) |
| Creates a new iterator for this space. | |
| BasicHypercube< V, U > | newInstance (String name, String[] new_variables, V[][] new_domains, U[] new_values, U infeasibleUtil) |
| Creates a new instance of a BasicHypercube. | |
| BasicHypercube< V, U > | scalarHypercube (U utility) |
| Creates a new instance of a ScalarBasicHypercube. | |
| boolean | contains (String[] variables_names) |
| Checks if this hypercube contains the provided variables. | |
| boolean | notEmptyDomains (V[][] domains) |
| Checks that there is no empty domain in an array of domains. | |
| boolean | consistentOrder (BasicHypercube< V, U >[] hypercubes) |
| Checks that the variables order is consistent in all hypercubes. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL > | |
| static< T > T[] | sub (T[] array1, T[] array2) |
| Computes the subtraction of two arrays. | |
| static< V extends Addable< V > V[] | intersection (V[] array1, V[] array2) |
| Computes the intersection between two arrays. | |
| Protected Attributes inherited from frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL > | |
| String[] | variables |
| The names of the variables of the hypercube ordered according to their order in the hypercube. | |
| V[][] | domains |
| The domains of the variables of the hypercube. | |
| transient Class< V > | classOfV |
| The class of V. | |
| transient V[] | assignment |
| An array of size variables.length that can be reused, instead of creating a new array each time we need one. | |
| U[] | values |
| The utility values. | |
| ProblemInterface< V, ?> | problem |
| The problem that should be notified of constraint checks. | |
| int | number_of_utility_values |
| The actual number of utilities values in the array. | |
| transient HashMap< V, Integer >[] | steps_hashmaps |
| For each variable, a hashmap that maps every value in the domain of this variable to a step in the utility values array. | |
| String | name |
| The name of this space, if any. | |
| U | infeasibleUtil |
| -INF if we are maximizing, +INF if we are minimizing | |
| Package Functions inherited from frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL > | |
| void | setStepsHashmaps () |
| Based on the hypercube parameters this method fills the steps Hashmap that maps each variable of the hypercube to another Hashmaps that maps each possible value of this variable to a step in the utility values array. | |
| Static Package Functions inherited from frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL > | |
| [static initializer] | |
A Hypercube whose utilities are AddableLimited's.
| <V> | the type used for variable values |
| <U> | the type used for Addable utilities |
| <UL> | the type used for AddableLimited utilities |
| frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.HypercubeLimited | ( | ) |
Empty constructor.
Referenced by clone(), newInstance(), resolve(), resolve(), scalarHypercube(), and slice().
| frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.HypercubeLimited | ( | String[] | variablesOrder, |
| V | variablesDomains[][], | ||
| UL[] | utilityValues, | ||
| UL | infeasibleUtil ) |
Constructor.
| variablesOrder | the array containing the variables names ordered according to their order in the hypercube |
| variablesDomains | the domains of the variables contained in the variables_order array and ordered in the same order. |
| utilityValues | the utility values contained in a one-dimensional array. there should be a utility value for each possible combination of values that the variables may take. |
| infeasibleUtil | -INF if we are maximizing, +INF if we are minimizing |
References frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.infeasibleUtil.
| frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.HypercubeLimited | ( | String | name, |
| String[] | variablesOrder, | ||
| V | variablesDomains[][], | ||
| UL[] | utilityValues, | ||
| UL | infeasibleUtil ) |
Constructor.
| name | the name of this HypercubeLimited |
| variablesOrder | the array containing the variables names ordered according to their order in the hypercube |
| variablesDomains | the domains of the variables contained in the variables_order array and ordered in the same order. |
| utilityValues | the utility values contained in a one-dimensional array. there should be a utility value for each possible combination of values that the variables may take. |
| infeasibleUtil | -INF if we are maximizing, +INF if we are minimizing |
References frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.infeasibleUtil, and frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.name.
| frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.HypercubeLimited | ( | String[] | variablesOrder, |
| V | variablesDomains[][], | ||
| UL[] | utilityValues, | ||
| UL | infeasibleUtil, | ||
| ProblemInterface< V, U > | problem ) |
Constructor.
| variablesOrder | the array containing the variables names ordered according to their order in the hypercube |
| variablesDomains | the domains of the variables contained in the variables_order array and ordered in the same order. |
| utilityValues | the utility values contained in a one-dimensional array. there should be a utility value for each possible combination of values that the variables may take. |
| infeasibleUtil | -INF if we are maximizing, +INF if we are minimizing |
| problem | the problem to be notified of constraint checks |
References frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.infeasibleUtil, and frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.problem.
| UtilitySolutionSpaceLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.blindProject | ( | String | varOut, |
| boolean | maximize ) |
References blindProject().
Referenced by blindProject(), blindProject(), max(), and min().

| UtilitySolutionSpaceLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.blindProject | ( | String[] | varsOut, |
| final boolean | maximize ) |
References blindProject(), blindProjectAll(), clone(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.domains, frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.getDomain(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.getNumberOfSolutions(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.infeasibleUtil, frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.iterator(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.name, newInstance(), scalarHypercube(), and frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.variables.

| UL frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.blindProjectAll | ( | final boolean | maximize | ) |
References frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.iterator().
Referenced by blindProject().

| HypercubeLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.clone | ( | ) |
References clone(), and HypercubeLimited().
Referenced by blindProject(), and clone().

| UtilitySolutionSpaceLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.join | ( | UtilitySolutionSpace< V, U > | space | ) |
References join().
Referenced by join(), join(), and joinMinNCCCs().

| UtilitySolutionSpaceLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.join | ( | UtilitySolutionSpace< V, U > | space, |
| final boolean | minNCCCs ) |
The join operation.
| space | input space |
| minNCCCs | whether to optimize runtime or NCCC count |
References frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.domains, frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.getClassOfU(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.getDomain(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.intersection(), frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.iterator(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.iterator(), join(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.name, newInstance(), frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.NullHypercube< V extends Addable< V >, U extends Addable< U > >.NULL, frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.union(), and frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.variables.

| UtilitySolutionSpaceLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.joinMinNCCCs | ( | UtilitySolutionSpace< V, U > | space | ) |
References join().

| UtilitySolutionSpaceLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.max | ( | String | variable | ) |
| UtilitySolutionSpaceLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.min | ( | String | variable | ) |
|
protected |
References HypercubeLimited(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.infeasibleUtil, and frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.name.
Referenced by blindProject(), and join().

|
protected |
| HypercubeLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.resolve | ( | ) |
References HypercubeLimited().

| HypercubeLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.resolve | ( | boolean | unused | ) |
References HypercubeLimited().

|
protected |
References frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.assignment, HypercubeLimited(), and frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.infeasibleUtil.
Referenced by blindProject().

| HypercubeLimited< V, U, UL > frodo2.solutionSpaces.hypercube.HypercubeLimited< V extends Addable< V >, U extends Addable< U >, UL extends AddableLimited< U, UL >.slice | ( | String | var, |
| V | val ) |
References HypercubeLimited(), and slice().
Referenced by slice().

|
protected |
References frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.getClassOfU(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.incrNCCCs(), frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.infeasibleUtil, frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.number_of_utility_values, and frodo2.solutionSpaces.hypercube.BasicHypercube< V, UL >.values.
