jopt.csp.spi.arcalgorithm.variable
Class VarFactory

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.variable.VarFactory
All Implemented Interfaces:
jopt.csp.variable.CspVariableFactory

public class VarFactory
extends java.lang.Object
implements jopt.csp.variable.CspVariableFactory

Implementation of CspVariables for creating implementations of variables


Constructor Summary
VarFactory()
           
 
Method Summary
 jopt.csp.variable.CspBooleanExpr booleanExpr(java.lang.String name, jopt.csp.variable.CspConstraint constraint)
          Creates a boolean expression that wraps a constraint
 jopt.csp.variable.CspBooleanVariable booleanVar(java.lang.String name)
          Creates a boolean variable
 jopt.csp.variable.CspBooleanVariable booleanVar(java.lang.String name, jopt.csp.variable.CspBooleanExpr expr)
          Creates an instance of a CspBooleanVariable object based on an expression.
 jopt.csp.variable.CspBooleanVariable booleanVar(java.lang.String name, jopt.csp.variable.CspConstraint constraint)
          Creates a boolean variable that wraps a constraint
 jopt.csp.variable.CspDoubleVariable doubleVar(java.lang.String name, jopt.csp.variable.CspDoubleCast expr)
          Creates an instance of a CspDoubleVariable object based on an expression.
 jopt.csp.variable.CspDoubleVariable doubleVar(java.lang.String name, jopt.csp.variable.CspDoubleVariable var)
          Creates an instance of a CspDoubleVariable object
 jopt.csp.variable.CspDoubleVariable doubleVar(java.lang.String name, double min, double max)
          Creates an instance of a CspDoubleVariable object
 jopt.csp.variable.CspFloatVariable floatVar(java.lang.String name, jopt.csp.variable.CspFloatCast expr)
          Creates an instance of a CspFloatVariable object based on an expression.
 jopt.csp.variable.CspFloatVariable floatVar(java.lang.String name, jopt.csp.variable.CspFloatVariable var)
          Creates an instance of a CspFloatVariable object
 jopt.csp.variable.CspFloatVariable floatVar(java.lang.String name, float min, float max)
          Creates an instance of a CspFloatVariable object
 jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, jopt.csp.variable.CspBooleanExpr[] expressions)
          Produces a generic variable that wraps a set of expressions
 jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, jopt.csp.variable.CspConstraint constraint)
          Produces a generic variable that wraps a constraint
 jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name, jopt.csp.variable.CspGenericIndex index, jopt.csp.variable.CspBooleanExpr[] expressions)
          Produces a generic variable that wraps a set of expressions
 jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name, jopt.csp.variable.CspGenericIndex index, jopt.csp.variable.CspConstraint constraint)
          Produces a generic variable that wraps a constraint
 jopt.csp.variable.CspGenericBooleanConstant genericBooleanConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, boolean[] nodes)
          Creates a generic boolean constant
 jopt.csp.variable.CspGenericBooleanConstant genericBooleanConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, boolean[] nodes)
          Creates a generic boolean constant
 jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, jopt.csp.variable.CspDoubleVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name, jopt.csp.variable.CspGenericIndex index, jopt.csp.variable.CspDoubleVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name, jopt.csp.variable.CspGenericIndex index, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, double[] nodes)
          Creates a generic double constant
 jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, java.lang.Double[] nodes)
          Creates a generic double constant
 jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, double[] nodes)
          Creates a generic double constant
 jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, java.lang.Double[] nodes)
          Creates a generic double constant
 jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, jopt.csp.variable.CspFloatVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name, jopt.csp.variable.CspGenericIndex index, jopt.csp.variable.CspFloatVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name, jopt.csp.variable.CspGenericIndex index, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, float[] nodes)
          Creates a generic float constant
 jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, java.lang.Float[] nodes)
          Creates a generic float constant
 jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, float[] nodes)
          Creates a generic float constant
 jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, java.lang.Float[] nodes)
          Creates a generic float constant
 jopt.csp.variable.CspGenericIndex genericIndex(java.lang.String name, int size)
          Creates a generic index for use with generic variables
 jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, jopt.csp.variable.CspIntVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name, jopt.csp.variable.CspGenericIndex index, jopt.csp.variable.CspIntVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name, jopt.csp.variable.CspGenericIndex index, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, int[] nodes)
          Creates a generic int constant
 jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, java.lang.Integer[] nodes)
          Creates a generic int constant
 jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, int[] nodes)
          Creates a generic int constant
 jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, java.lang.Integer[] nodes)
          Creates a generic int constant
 jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, jopt.csp.variable.CspLongVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name, jopt.csp.variable.CspGenericIndex index, jopt.csp.variable.CspLongVariable[] variables)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name, jopt.csp.variable.CspGenericIndex index, int min, int max)
          Produces a generic variable that wraps a set of nodes
 jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, long[] nodes)
          Creates a generic long constant
 jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name, jopt.csp.variable.CspGenericIndex[] indices, java.lang.Long[] nodes)
          Creates a generic long constant
 jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, long[] nodes)
          Creates a generic long constant
 jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name, jopt.csp.variable.CspGenericIndex index, java.lang.Long[] nodes)
          Creates a generic long constant
 double getDefaultPrecision()
          Returns the default precision used when creating real variables
 jopt.csp.variable.CspMath getMath()
          Returns a variable math object for extended math operations
 jopt.csp.variable.CspSetConstraints getSetConstraints()
          Returns an object used to create constraints on sets
 jopt.csp.variable.CspIntSetVariable intSetVar(java.lang.String name, int min, int max)
          Creates an instance of a CspIntSetVariable object
 jopt.csp.variable.CspIntVariable intVar(java.lang.String name, jopt.csp.variable.CspIntExpr expr)
          Creates an instance of a CspIntVariable object based on an expression.
 jopt.csp.variable.CspIntVariable intVar(java.lang.String name, jopt.csp.variable.CspIntVariable var)
          Creates an instance of a CspIntVariable object
 jopt.csp.variable.CspIntVariable intVar(java.lang.String name, int min, int max)
          Creates an instance of a CspIntVariable object; uses an interval domain by default
 jopt.csp.variable.CspIntVariable intVar(java.lang.String name, int min, int max, boolean sparse)
          Creates an instance of a CspIntVariable object
 jopt.csp.variable.CspIntVariable intVar(java.lang.String name, jopt.csp.util.IntSparseSet vals)
          Creates an instance of a CspIntVariable object; uses an interval domain by default
 jopt.csp.variable.CspLongVariable longVar(java.lang.String name, jopt.csp.variable.CspLongCast expr)
          Creates an instance of a CspLongVariable object based on an expression.
 jopt.csp.variable.CspLongVariable longVar(java.lang.String name, jopt.csp.variable.CspLongVariable var)
          Creates an instance of a CspLongVariable object
 jopt.csp.variable.CspLongVariable longVar(java.lang.String name, long min, long max)
          Creates an instance of a CspLongVariable object; uses an interval domain by default
 jopt.csp.variable.CspLongVariable longVar(java.lang.String name, long min, long max, boolean sparse)
          Creates an instance of a CspLongVariable object
 void setDefaultPrecision(double p)
          Sets the default precision used when creating real variables
static BoolExpr[] toBoolExprArray(jopt.csp.variable.CspBooleanExpr[] expressions)
          Converts an array of CSP expressions to internal boolean expressions
static GenericIndex[] toGenericIndex(jopt.csp.variable.CspGenericIndex[] expressions)
          Converts an array of CSP GenericIndex's to GenericIndex's
static NumExpr[] toNumExprArray(jopt.csp.variable.CspBooleanVariable[] variables)
          Converts an array of CSP expressions to internal numeric expressions
static NumExpr[] toNumExprArray(jopt.csp.variable.CspNumVariable[] variables)
          Converts an array of CSP expressions to internal numeric expressions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarFactory

public VarFactory()
Method Detail

setDefaultPrecision

public void setDefaultPrecision(double p)
Sets the default precision used when creating real variables

Specified by:
setDefaultPrecision in interface jopt.csp.variable.CspVariableFactory

getDefaultPrecision

public double getDefaultPrecision()
Returns the default precision used when creating real variables

Specified by:
getDefaultPrecision in interface jopt.csp.variable.CspVariableFactory

getMath

public jopt.csp.variable.CspMath getMath()
Returns a variable math object for extended math operations

Specified by:
getMath in interface jopt.csp.variable.CspVariableFactory

getSetConstraints

public jopt.csp.variable.CspSetConstraints getSetConstraints()
Returns an object used to create constraints on sets

Specified by:
getSetConstraints in interface jopt.csp.variable.CspVariableFactory

intVar

public jopt.csp.variable.CspIntVariable intVar(java.lang.String name,
                                               int min,
                                               int max)
Creates an instance of a CspIntVariable object; uses an interval domain by default

Specified by:
intVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
min - Lower bound for variable's domain
max - Upper bound for variable's domain

intVar

public jopt.csp.variable.CspIntVariable intVar(java.lang.String name,
                                               jopt.csp.util.IntSparseSet vals)
Creates an instance of a CspIntVariable object; uses an interval domain by default

Specified by:
intVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
vals - Set of sparse values for variable's domain

intVar

public jopt.csp.variable.CspIntVariable intVar(java.lang.String name,
                                               int min,
                                               int max,
                                               boolean sparse)
Creates an instance of a CspIntVariable object

Specified by:
intVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
min - Lower bound for variable's domain
max - Upper bound for variable's domain
sparse - Specifies the use of a sparse or interval domain

intVar

public jopt.csp.variable.CspIntVariable intVar(java.lang.String name,
                                               jopt.csp.variable.CspIntVariable var)
Creates an instance of a CspIntVariable object

Specified by:
intVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
var - Existing variable with a domain to clone

intVar

public jopt.csp.variable.CspIntVariable intVar(java.lang.String name,
                                               jopt.csp.variable.CspIntExpr expr)
Creates an instance of a CspIntVariable object based on an expression. The expression is constrained to be equal to the new variable.

Specified by:
intVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
expr - Expression that variable is based upon

longVar

public jopt.csp.variable.CspLongVariable longVar(java.lang.String name,
                                                 long min,
                                                 long max)
Creates an instance of a CspLongVariable object; uses an interval domain by default

Specified by:
longVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
min - Lower bound for variable's domain
max - Upper bound for variable's domain

longVar

public jopt.csp.variable.CspLongVariable longVar(java.lang.String name,
                                                 long min,
                                                 long max,
                                                 boolean sparse)
Creates an instance of a CspLongVariable object

Specified by:
longVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
min - Lower bound for variable's domain
max - Upper bound for variable's domain
sparse - Specifies the use of a sparse or interval domain

longVar

public jopt.csp.variable.CspLongVariable longVar(java.lang.String name,
                                                 jopt.csp.variable.CspLongVariable var)
Creates an instance of a CspLongVariable object

Specified by:
longVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
var - Existing variable with a domain to clone

longVar

public jopt.csp.variable.CspLongVariable longVar(java.lang.String name,
                                                 jopt.csp.variable.CspLongCast expr)
Creates an instance of a CspLongVariable object based on an expression. The expression is constrained to be equal to the new variable.

Specified by:
longVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
expr - Expression that variable is based upon

floatVar

public jopt.csp.variable.CspFloatVariable floatVar(java.lang.String name,
                                                   float min,
                                                   float max)
Creates an instance of a CspFloatVariable object

Specified by:
floatVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
min - Lower bound for variable's domain
max - Upper bound for variable's domain

floatVar

public jopt.csp.variable.CspFloatVariable floatVar(java.lang.String name,
                                                   jopt.csp.variable.CspFloatVariable var)
Creates an instance of a CspFloatVariable object

Specified by:
floatVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
var - Existing variable with a domain to clone

floatVar

public jopt.csp.variable.CspFloatVariable floatVar(java.lang.String name,
                                                   jopt.csp.variable.CspFloatCast expr)
Creates an instance of a CspFloatVariable object based on an expression. The expression is constrained to be equal to the new variable.

Specified by:
floatVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
expr - Expression that variable is based upon

doubleVar

public jopt.csp.variable.CspDoubleVariable doubleVar(java.lang.String name,
                                                     double min,
                                                     double max)
Creates an instance of a CspDoubleVariable object

Specified by:
doubleVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
min - Lower bound for variable's domain
max - Upper bound for variable's domain

doubleVar

public jopt.csp.variable.CspDoubleVariable doubleVar(java.lang.String name,
                                                     jopt.csp.variable.CspDoubleVariable var)
Creates an instance of a CspDoubleVariable object

Specified by:
doubleVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
var - Existing variable with a domain to clone

doubleVar

public jopt.csp.variable.CspDoubleVariable doubleVar(java.lang.String name,
                                                     jopt.csp.variable.CspDoubleCast expr)
Creates an instance of a CspDoubleVariable object based on an expression. The expression is constrained to be equal to the new variable.

Specified by:
doubleVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
expr - Expression that variable is based upon

intSetVar

public jopt.csp.variable.CspIntSetVariable intSetVar(java.lang.String name,
                                                     int min,
                                                     int max)
Creates an instance of a CspIntSetVariable object

Specified by:
intSetVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
min - Lower bound for variable's domain
max - Upper bound for variable's domain

genericIndex

public jopt.csp.variable.CspGenericIndex genericIndex(java.lang.String name,
                                                      int size)
Creates a generic index for use with generic variables

Specified by:
genericIndex in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to index
size - Total number of variables that will be used with index

genericInt

public jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name,
                                                      jopt.csp.variable.CspGenericIndex index,
                                                      jopt.csp.variable.CspIntVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericInt in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
variables - Array of variables generic variable wraps

genericInt

public jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name,
                                                      jopt.csp.variable.CspGenericIndex[] indices,
                                                      jopt.csp.variable.CspIntVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericInt in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
variables - Array of variables generic variable wraps

genericInt

public jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name,
                                                      jopt.csp.variable.CspGenericIndex index,
                                                      int min,
                                                      int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericInt in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericInt

public jopt.csp.variable.CspGenericIntExpr genericInt(java.lang.String name,
                                                      jopt.csp.variable.CspGenericIndex[] indices,
                                                      int min,
                                                      int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericInt in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericLong

public jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name,
                                                        jopt.csp.variable.CspGenericIndex index,
                                                        jopt.csp.variable.CspLongVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericLong in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
variables - Array of variables generic variable wraps

genericLong

public jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name,
                                                        jopt.csp.variable.CspGenericIndex[] indices,
                                                        jopt.csp.variable.CspLongVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericLong in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
variables - Array of variables generic variable wraps

genericLong

public jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name,
                                                        jopt.csp.variable.CspGenericIndex index,
                                                        int min,
                                                        int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericLong in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericLong

public jopt.csp.variable.CspGenericLongExpr genericLong(java.lang.String name,
                                                        jopt.csp.variable.CspGenericIndex[] indices,
                                                        int min,
                                                        int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericLong in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericFloat

public jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name,
                                                          jopt.csp.variable.CspGenericIndex index,
                                                          jopt.csp.variable.CspFloatVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericFloat in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
variables - Array of variables generic variable wraps

genericFloat

public jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name,
                                                          jopt.csp.variable.CspGenericIndex[] indices,
                                                          jopt.csp.variable.CspFloatVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericFloat in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
variables - Array of variables generic variable wraps

genericFloat

public jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name,
                                                          jopt.csp.variable.CspGenericIndex index,
                                                          int min,
                                                          int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericFloat in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericFloat

public jopt.csp.variable.CspGenericFloatExpr genericFloat(java.lang.String name,
                                                          jopt.csp.variable.CspGenericIndex[] indices,
                                                          int min,
                                                          int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericFloat in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericDouble

public jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name,
                                                            jopt.csp.variable.CspGenericIndex index,
                                                            jopt.csp.variable.CspDoubleVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericDouble in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
variables - Array of variables generic variable wraps

genericDouble

public jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name,
                                                            jopt.csp.variable.CspGenericIndex[] indices,
                                                            jopt.csp.variable.CspDoubleVariable[] variables)
Produces a generic variable that wraps a set of nodes

Specified by:
genericDouble in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
variables - Array of variables generic variable wraps

genericDouble

public jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name,
                                                            jopt.csp.variable.CspGenericIndex index,
                                                            int min,
                                                            int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericDouble in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is based upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericDouble

public jopt.csp.variable.CspGenericDoubleExpr genericDouble(java.lang.String name,
                                                            jopt.csp.variable.CspGenericIndex[] indices,
                                                            int min,
                                                            int max)
Produces a generic variable that wraps a set of nodes

Specified by:
genericDouble in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
min - Minimum value of domain of internal variables
max - Maximum value of domain of internal variables

genericBoolean

public jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name,
                                                              jopt.csp.variable.CspGenericIndex[] indices,
                                                              jopt.csp.variable.CspBooleanExpr[] expressions)
Produces a generic variable that wraps a set of expressions

Specified by:
genericBoolean in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
expressions - Array of expressions that the generic expression wraps

genericBoolean

public jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name,
                                                              jopt.csp.variable.CspGenericIndex[] indices,
                                                              jopt.csp.variable.CspConstraint constraint)
Produces a generic variable that wraps a constraint

Specified by:
genericBoolean in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
indices - Array of indices variable is indexed upon
constraint - Constraint that wrapped by the generic expression

genericBoolean

public jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name,
                                                              jopt.csp.variable.CspGenericIndex index,
                                                              jopt.csp.variable.CspBooleanExpr[] expressions)
Produces a generic variable that wraps a set of expressions

Specified by:
genericBoolean in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is indexed upon
expressions - Array of expressions that the generic expression wraps

genericBoolean

public jopt.csp.variable.CspGenericBooleanExpr genericBoolean(java.lang.String name,
                                                              jopt.csp.variable.CspGenericIndex index,
                                                              jopt.csp.variable.CspConstraint constraint)
Produces a generic variable that wraps a constraint

Specified by:
genericBoolean in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
index - Index variable is indexed upon
constraint - Constraint that wrapped by the generic expression

toNumExprArray

public static NumExpr[] toNumExprArray(jopt.csp.variable.CspNumVariable[] variables)
Converts an array of CSP expressions to internal numeric expressions


toNumExprArray

public static NumExpr[] toNumExprArray(jopt.csp.variable.CspBooleanVariable[] variables)
Converts an array of CSP expressions to internal numeric expressions


toBoolExprArray

public static BoolExpr[] toBoolExprArray(jopt.csp.variable.CspBooleanExpr[] expressions)
Converts an array of CSP expressions to internal boolean expressions


toGenericIndex

public static GenericIndex[] toGenericIndex(jopt.csp.variable.CspGenericIndex[] expressions)
Converts an array of CSP GenericIndex's to GenericIndex's


booleanExpr

public jopt.csp.variable.CspBooleanExpr booleanExpr(java.lang.String name,
                                                    jopt.csp.variable.CspConstraint constraint)
Creates a boolean expression that wraps a constraint

Parameters:
name - Name of the new expression
constraint - Constraint that boolean variable will represent
Returns:
Boolean expression to be used in building other expressions

booleanVar

public jopt.csp.variable.CspBooleanVariable booleanVar(java.lang.String name,
                                                       jopt.csp.variable.CspConstraint constraint)
Creates a boolean variable that wraps a constraint

Specified by:
booleanVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new variable
constraint - Constraint that boolean variable will represent
Returns:
Boolean variable to be used in boolean expressions

booleanVar

public jopt.csp.variable.CspBooleanVariable booleanVar(java.lang.String name,
                                                       jopt.csp.variable.CspBooleanExpr expr)
Creates an instance of a CspBooleanVariable object based on an expression. The expression is constrained to be equal to the new variable.

Specified by:
booleanVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Unique name assigned to variable
expr - Expression that variable is based upon

booleanVar

public jopt.csp.variable.CspBooleanVariable booleanVar(java.lang.String name)
Creates a boolean variable

Specified by:
booleanVar in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new variable
Returns:
Boolean variable to be used in boolean expressions

genericIntConst

public jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name,
                                                               jopt.csp.variable.CspGenericIndex[] indices,
                                                               java.lang.Integer[] nodes)
Creates a generic int constant

Specified by:
genericIntConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of Integer objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericIntConst

public jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name,
                                                               jopt.csp.variable.CspGenericIndex[] indices,
                                                               int[] nodes)
Creates a generic int constant

Specified by:
genericIntConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of ints containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericDoubleConst

public jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name,
                                                                     jopt.csp.variable.CspGenericIndex[] indices,
                                                                     java.lang.Double[] nodes)
Creates a generic double constant

Specified by:
genericDoubleConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of Double objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericDoubleConst

public jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name,
                                                                     jopt.csp.variable.CspGenericIndex[] indices,
                                                                     double[] nodes)
Creates a generic double constant

Specified by:
genericDoubleConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of doubles containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericFloatConst

public jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name,
                                                                   jopt.csp.variable.CspGenericIndex[] indices,
                                                                   java.lang.Float[] nodes)
Creates a generic float constant

Specified by:
genericFloatConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of Float objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericFloatConst

public jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name,
                                                                   jopt.csp.variable.CspGenericIndex[] indices,
                                                                   float[] nodes)
Creates a generic float constant

Specified by:
genericFloatConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of floats containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericLongConst

public jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name,
                                                                 jopt.csp.variable.CspGenericIndex[] indices,
                                                                 java.lang.Long[] nodes)
Creates a generic long constant

Specified by:
genericLongConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of Long objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericLongConst

public jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name,
                                                                 jopt.csp.variable.CspGenericIndex[] indices,
                                                                 long[] nodes)
Creates a generic long constant

Specified by:
genericLongConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Array of indices constant is indexed upon
nodes - Array of longs containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericIntConst

public jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name,
                                                               jopt.csp.variable.CspGenericIndex index,
                                                               java.lang.Integer[] nodes)
Creates a generic int constant

Specified by:
genericIntConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of Integer objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericIntConst

public jopt.csp.variable.CspGenericIntConstant genericIntConst(java.lang.String name,
                                                               jopt.csp.variable.CspGenericIndex index,
                                                               int[] nodes)
Creates a generic int constant

Specified by:
genericIntConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of ints containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericDoubleConst

public jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name,
                                                                     jopt.csp.variable.CspGenericIndex index,
                                                                     java.lang.Double[] nodes)
Creates a generic double constant

Specified by:
genericDoubleConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of Double objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericDoubleConst

public jopt.csp.variable.CspGenericDoubleConstant genericDoubleConst(java.lang.String name,
                                                                     jopt.csp.variable.CspGenericIndex index,
                                                                     double[] nodes)
Creates a generic double constant

Specified by:
genericDoubleConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of doubles containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericFloatConst

public jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name,
                                                                   jopt.csp.variable.CspGenericIndex index,
                                                                   java.lang.Float[] nodes)
Creates a generic float constant

Specified by:
genericFloatConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of Float objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericFloatConst

public jopt.csp.variable.CspGenericFloatConstant genericFloatConst(java.lang.String name,
                                                                   jopt.csp.variable.CspGenericIndex index,
                                                                   float[] nodes)
Creates a generic float constant

Specified by:
genericFloatConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of floats containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericLongConst

public jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name,
                                                                 jopt.csp.variable.CspGenericIndex index,
                                                                 java.lang.Long[] nodes)
Creates a generic long constant

Specified by:
genericLongConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of Long objects containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericLongConst

public jopt.csp.variable.CspGenericLongConstant genericLongConst(java.lang.String name,
                                                                 jopt.csp.variable.CspGenericIndex index,
                                                                 long[] nodes)
Creates a generic long constant

Specified by:
genericLongConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of longs containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericBooleanConst

public jopt.csp.variable.CspGenericBooleanConstant genericBooleanConst(java.lang.String name,
                                                                       jopt.csp.variable.CspGenericIndex[] indices,
                                                                       boolean[] nodes)
Creates a generic boolean constant

Specified by:
genericBooleanConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
indices - Index variable is indexed upon
nodes - Array of longs containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions

genericBooleanConst

public jopt.csp.variable.CspGenericBooleanConstant genericBooleanConst(java.lang.String name,
                                                                       jopt.csp.variable.CspGenericIndex index,
                                                                       boolean[] nodes)
Creates a generic boolean constant

Specified by:
genericBooleanConst in interface jopt.csp.variable.CspVariableFactory
Parameters:
name - Name of the new constant
index - Index variable is indexed upon
nodes - Array of longs containing the values for the constants
Returns:
CspGenericIntConstant to be used in Generic expressions