|
Cream version 1.06 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.ac.kobe_u.cs.cream.Variable
jp.ac.kobe_u.cs.cream.IntVariable
public class IntVariable
Integer variables.
IntDomain
Constructor Summary | |
---|---|
IntVariable(Network net)
Constructs an integer variable with full domain and a default name. |
|
IntVariable(Network net,
int value)
Constructs an integer variable of a singleton domain and a default name. |
|
IntVariable(Network net,
IntDomain d)
Constructs an integer variable of the network with an initial integer domain d and a default name. |
|
IntVariable(Network net,
IntDomain d,
String name)
Constructs an integer variable of the network with an initial integer domain d and a name specified by the parameter name. |
|
IntVariable(Network net,
int lo,
int hi)
Constructs an integer variable of the interval lo..hi and a default name. |
|
IntVariable(Network net,
int lo,
int hi,
String name)
Constructs an integer variable of the interval lo..hi and the given name. |
|
IntVariable(Network net,
int value,
String name)
Constructs an integer variable of a singleton domain and the given name. |
|
IntVariable(Network net,
String name)
Constructs an integer variable with full domain and the given name. |
Method Summary | |
---|---|
IntVariable |
abs()
Returns a new integer variable which is equal to abs(this). |
IntVariable |
add(int value)
Returns a new integer variable which is equal to this + value. |
IntVariable |
add(IntVariable v)
Returns a new integer variable which is equal to this + v. |
void |
equals(int value)
Adds a new constraint this == value. |
void |
equals(IntVariable v)
Adds a new constraint this == v. |
void |
ge(int value)
Adds a new constraint this >= value. |
void |
ge(IntVariable v)
Adds a new constraint this >= v. |
void |
gt(int value)
Adds a new constraint this > value. |
void |
gt(IntVariable v)
Adds a new constraint this > v. |
void |
le(int value)
Adds a new constraint this <= value. |
void |
le(IntVariable v)
Adds a new constraint this <= v. |
void |
lt(int value)
Adds a new constraint this < value. |
void |
lt(IntVariable v)
Adds a new constraint this < v. |
IntVariable |
max(int value)
Returns a new integer variable which is equal to max(this, value). |
IntVariable |
max(IntVariable v)
Returns a new integer variable which is equal to max(this, v). |
IntVariable |
min(int value)
Returns a new integer variable which is equal to min(this, value). |
IntVariable |
min(IntVariable v)
Returns a new integer variable which is equal to min(this, v). |
IntVariable |
multiply(int value)
Returns a new integer variable which is equal to this * value. |
IntVariable |
multiply(IntVariable v)
Returns a new integer variable which is equal to this * v. |
IntVariable |
negate()
Returns a new integer variable which is equal to -this. |
void |
notEquals(int value)
Adds a new constraint this != value. |
void |
notEquals(IntVariable v)
Adds a new constraint this != v. |
IntVariable |
sign()
Returns a new integer variable which is equal to sign(this). |
IntVariable |
subtract(int value)
Returns a new integer variable which is equal to this - value. |
IntVariable |
subtract(IntVariable v)
Returns a new integer variable which is equal to this - v. |
Methods inherited from class jp.ac.kobe_u.cs.cream.Variable |
---|
getDomain, getIndex, getName, getNetwork, isModified, isWatch, setDomain, setIndex, setModified, setName, setWatch, toString, updateDomain |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntVariable(Network net)
net
- the networkpublic IntVariable(Network net, String name)
net
- the networkname
- the name of this variablepublic IntVariable(Network net, IntDomain d)
net
- the networkd
- the initial integer domainpublic IntVariable(Network net, IntDomain d, String name)
net
- the networkd
- the initial integer domainname
- the name of the variable, or null for a default
namepublic IntVariable(Network net, int value)
net
- the networkvalue
- the singleton valuepublic IntVariable(Network net, int value, String name)
net
- the networkvalue
- the singleton valuename
- the name of the variablepublic IntVariable(Network net, int lo, int hi)
net
- the networklo
- the lower boundhi
- the upper boundpublic IntVariable(Network net, int lo, int hi, String name)
net
- the networklo
- the lower boundhi
- the upper boundname
- the name of the variableMethod Detail |
---|
public IntVariable add(IntVariable v)
v
- the variable to be added
IntArith
public IntVariable add(int value)
value
- the value to be added
IntArith
public IntVariable subtract(IntVariable v)
v
- the variable to be subtracted
IntArith
public IntVariable subtract(int value)
value
- the value to be subtracted
IntArith
public IntVariable multiply(IntVariable v)
v
- the variable to be multiplied
IntArith
public IntVariable multiply(int value)
value
- the value to be multiplied
IntArith
public IntVariable max(IntVariable v)
v
- the variable
IntArith
public IntVariable max(int value)
value
- the value
IntArith
public IntVariable min(IntVariable v)
v
- the variable
IntArith
public IntVariable min(int value)
value
- the value
IntArith
public IntVariable negate()
IntFunc
public IntVariable abs()
IntFunc
public IntVariable sign()
IntFunc
public void equals(IntVariable v)
v
- the variable to be comparedEquals
public void equals(int value)
value
- the value to be comparedEquals
public void notEquals(IntVariable v)
v
- the variable to be comparedNotEquals
public void notEquals(int value)
value
- the value to be comparedNotEquals
public void le(IntVariable v)
v
- the variable to be comparedIntComparison
public void le(int value)
value
- the value to be comparedIntComparison
public void lt(IntVariable v)
v
- the variable to be comparedIntComparison
public void lt(int value)
value
- the value to be comparedIntComparison
public void ge(IntVariable v)
v
- the variable to be comparedIntComparison
public void ge(int value)
value
- the value to be comparedIntComparison
public void gt(IntVariable v)
v
- the variable to be comparedIntComparison
public void gt(int value)
value
- the value to be comparedIntComparison
|
Cream version 1.06 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |