|
Cream version 1.4 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
public class Variable
Variables. A variable is a component of a
constraint network. A variable is constructed with an
initial domain which specifies the set of elements over
which the variable ranges. See Network
for example programs to
construct variables and add them to a constraint network.
Network
,
Domain
Constructor Summary | |
---|---|
Variable(Network net,
Domain d)
Constructs a variable of the network with an initial domain d and a default name. |
|
Variable(Network net,
Domain d,
String name)
Constructs a variable of the network with an initial domain d and a name specified by the parameter name. |
Method Summary | |
---|---|
Domain |
getDomain()
Returns the domain of the variable. |
int |
getIndex()
Returns the index of the variable in the network. |
String |
getName()
Returns the name of this variable. |
Network |
getNetwork()
Returns the constraint network. |
boolean |
isModified()
Returns the modified flag. |
boolean |
isWatch()
Returns the watch flag. |
void |
setDomain(Domain d)
Sets the domain of the variables. |
void |
setIndex(int index)
Sets the index of the variable in the network. |
void |
setModified(boolean modified)
Sets the modified flag. |
void |
setName(String name)
Sets the name of this variable. |
void |
setWatch(boolean watch)
Sets the watch flag. |
String |
toString()
Returns the name of this variable. |
void |
updateDomain(Domain d,
Trail trail)
Updates the domain of the variables. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Variable(Network net, Domain d)
net
- the networkd
- the initial domainpublic Variable(Network net, Domain d, String name)
net
- the networkd
- the initial domainname
- the name of the variable, or null for a default
nameMethod Detail |
---|
public Network getNetwork()
public void setIndex(int index)
index
- the indexpublic int getIndex()
public Domain getDomain()
public void setDomain(Domain d)
d
- the domain.public void updateDomain(Domain d, Trail trail)
d
- the domain.trail
- the trail stackpublic boolean isModified()
public void setModified(boolean modified)
modified
- the modified to setpublic boolean isWatch()
public void setWatch(boolean watch)
watch
- the watch to setpublic String getName()
public void setName(String name)
name
- the name to setpublic String toString()
toString
in class Object
|
Cream version 1.4 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |