|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectedu.neu.ccs.evergreen.ir.Relation
public class Relation
| Field Summary |
|---|
| Fields inherited from interface edu.neu.ccs.evergreen.ir.RelationI |
|---|
SOURCE, TARGET |
| Constructor Summary | |
|---|---|
Relation(int rank,
int relationNumber)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
int |
firstForcedVariable(int startPosition)
starting at the given startPosition, get the position of the first variable forced by the relation. |
int |
getMagicNumber(int variablePosition,
int value)
Returns a magic number associated with a certain truth table column and value The magic number associated with column number 0 of the truth table and value 0 is basically a sequence of alternating 0 and 1 bits, packed together in one integer. |
int |
getMask()
|
int |
getRank()
|
int |
getRelationNumber()
|
int |
isForced(int variablePosition)
Checks if the relation forces the given variablePosition |
boolean |
isIrrelevant(int variablePosition)
Checks if the variable at a given position is irrelevant to the internally stored relation |
int |
nMap(int variablePosition)
NMaps one of the variables in a relation i.e. |
int |
numberOfRelevantVariables()
Counts the number of relevantVariables in the relation |
int |
ones()
returns the number of ones in the given relationNumber |
int |
q(int s)
|
int |
reduce(int variablePosition,
int value)
Reduces a relation by assigning a value to one of its variables |
int |
renme(int permutationSemantics,
int... permutation)
|
void |
setRank(int rank)
Currently unsupported Usually converting to a higher rank is simple. |
void |
setRelationNumber(int relationNumber)
|
int |
swap(int variablePosition1,
int variablePosition2)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Relation(int rank,
int relationNumber)
rank - relationNumber - | Method Detail |
|---|
public int firstForcedVariable(int startPosition)
throws java.lang.IllegalArgumentException
RelationI
firstForcedVariable in interface RelationIjava.lang.IllegalArgumentException
public int getMagicNumber(int variablePosition,
int value)
throws java.lang.IllegalArgumentException
RelationI
getMagicNumber in interface RelationIvariablePosition - the position of the desired magic numbervalue - the value associated with the desired magic number
java.lang.IllegalArgumentExceptionpublic int getMask()
getMask in interface RelationIpublic int getRank()
getRank in interface RelationIpublic int getRelationNumber()
getRelationNumber in interface RelationI
public int isForced(int variablePosition)
throws java.lang.IllegalArgumentException
RelationI
isForced in interface RelationIvariablePosition - positon of the varible checked for being forced
java.lang.IllegalArgumentException
public boolean isIrrelevant(int variablePosition)
throws java.lang.IllegalArgumentException
RelationI
isIrrelevant in interface RelationIvariablePosition - the variable to be checked
java.lang.IllegalArgumentException
public int nMap(int variablePosition)
throws java.lang.IllegalArgumentException
RelationI
nMap in interface RelationIvariablePosition - the variable to be nmapped
java.lang.IllegalArgumentExceptionpublic int numberOfRelevantVariables()
RelationI
numberOfRelevantVariables in interface RelationIpublic int ones()
RelationI
ones in interface RelationI
public int q(int s)
throws java.lang.IllegalArgumentException
q in interface RelationIjava.lang.IllegalArgumentException
public int reduce(int variablePosition,
int value)
throws java.lang.IllegalArgumentException
RelationI
reduce in interface RelationIjava.lang.IllegalArgumentException
public int renme(int permutationSemantics,
int... permutation)
throws java.lang.IllegalArgumentException
renme in interface RelationIjava.lang.IllegalArgumentException
public void setRank(int rank)
throws java.lang.IllegalArgumentException
RelationI
setRank in interface RelationIrank - sets the rank of the relation
java.lang.IllegalArgumentException
public void setRelationNumber(int relationNumber)
throws java.lang.IllegalArgumentException
setRelationNumber in interface RelationIjava.lang.IllegalArgumentException - Thrwon if the relation number is invalid according to the rank
public int swap(int variablePosition1,
int variablePosition2)
throws java.lang.IllegalArgumentException
swap in interface RelationIjava.lang.IllegalArgumentExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||