|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectomnics.Tuple
public class Tuple
A tuple represents an instantiation of variables: (x1=a1,x2=a2,...,xk=ak)
| Constructor Summary | |
|---|---|
Tuple()
Creates a new instance of Tuple |
|
Tuple(Tuple tuple)
Creates a new instance of Tuple |
|
Tuple(Var[] varArray,
java.lang.Object[] values)
Creates a new instance of Tuple |
|
Tuple(Var var,
java.lang.Object value)
Creates a new instance of Tuple |
|
Tuple(VarSet vars,
java.lang.Object[] values)
Creates a new instance of Tuple |
|
| Method Summary | |
|---|---|
boolean |
contains(Var x)
|
boolean |
equals(java.lang.Object object)
|
java.lang.Object |
get(int index)
Returns the value of the variable with the given index. |
java.lang.Object |
get(Var var)
Returns the value of the given variable. |
Problem |
getProblem()
Returns the problem. |
java.lang.Object |
getValue(java.lang.String name)
Returns the value of a variable of the tuple specified by name |
Var[] |
getVarArray()
Returns the variables of the problem as an array |
Var |
getVariable(java.lang.String name)
Returns a variable of the tuple specified by name |
Constraint |
getViolatedConstraint()
Tests if this tuple is consistent relative only to the constraints that include the specified variable |
boolean |
isConsistent()
Returns a constraint which is not satisfied bu this tuple. |
boolean |
isConsistent(Constraint constraint)
Tests if this tuple is consistent relative to the given constraint |
boolean |
isConsistent(Var var)
Tests if this tuple is consistent relative only to the constraints that include the specified variable |
boolean |
isFeasible(Var var)
Tests if this tuple is feasible with the specified variable, that is if it exists a value a for the variable var such that the instantiation formed by this tuple and var=a is consistent. |
Tuple |
join(Tuple other)
Returns the join with the specified tuple. |
Tuple |
projection(VarSet vars)
Return the projection on the specified set of variables |
java.lang.Object |
put(Var var,
java.lang.Object value)
Adds a new pair (variable, value) |
java.lang.Object |
remove(Var var)
Removes a variable. |
int |
size()
Returns the size of the tuple. |
java.lang.String |
toString()
Returns a string representation of the tuple. |
Tuple |
union(Tuple other)
Returns the union with the specified tuple. |
VarSet |
variables()
Returns the variables of the tuple as a VarSet |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Tuple()
public Tuple(Var var,
java.lang.Object value)
public Tuple(VarSet vars,
java.lang.Object[] values)
public Tuple(Var[] varArray,
java.lang.Object[] values)
public Tuple(Tuple tuple)
| Method Detail |
|---|
public Problem getProblem()
public java.lang.Object put(Var var,
java.lang.Object value)
public java.lang.Object get(Var var)
public java.lang.Object get(int index)
public java.lang.Object remove(Var var)
public VarSet variables()
public int size()
public Var[] getVarArray()
public Var getVariable(java.lang.String name)
public java.lang.Object getValue(java.lang.String name)
public Tuple projection(VarSet vars)
public Tuple union(Tuple other)
public Tuple join(Tuple other)
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean contains(Var x)
public boolean isConsistent(Constraint constraint)
public boolean isConsistent(Var var)
public boolean isConsistent()
public Constraint getViolatedConstraint()
public boolean isFeasible(Var var)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||