|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet
cc.mallet.grmm.types.BitVarSet
public class BitVarSet
A clique that uses very little time and memory based on the flyweight pattern. The owner supplies an Alphabet of vertices and a BitSet, and the clique contains the vertices in the Alphabet, masked by the BitSet.
| Constructor Summary | |
|---|---|
BitVarSet(Universe universe,
java.util.BitSet included)
Creates a BitSet clique given an alphabet of Variables, and a bitset that says which variables in the alphabet to include in the clique. |
|
BitVarSet(Universe universe,
java.util.Collection included)
|
|
BitVarSet(VarSet vsOld)
|
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object o)
|
AssignmentIterator |
assignmentIterator()
Returns an iterator over the assignments to this clique. |
void |
clear()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(BitVarSet bsc)
Efficient version of containsAll() for BitSetCliques. |
boolean |
containsAll(java.util.Collection c)
|
Variable |
get(int idx)
Returns the variable in this clique at index idx. |
java.lang.String |
getLabel()
|
int |
hashCode()
|
boolean |
hasLabel()
|
VarSet |
intersection(VarSet c)
Returns the intersection of two cliques. |
int |
intersectionSize(BitVarSet bsc)
Returns the number of variables in the intersection between this clique and other. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
void |
setLabel(java.lang.String s)
|
int |
size()
|
java.lang.String |
toString()
|
Variable[] |
toVariableArray()
Returns the variables in this clique as an array, that should not be modified. |
int |
weight()
Returns the number of assignments of this clique. |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, remove, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
addAll, equals, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public BitVarSet(Universe universe,
java.util.BitSet included)
universe - included - Bit mask that indicates which variables to include
public BitVarSet(Universe universe,
java.util.Collection included)
public BitVarSet(VarSet vsOld)
| Method Detail |
|---|
public boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.AbstractCollectionpublic Variable get(int idx)
VarSet
get in interface VarSetpublic Variable[] toVariableArray()
VarSet
toVariableArray in interface VarSetpublic int weight()
VarSet
weight in interface VarSetpublic AssignmentIterator assignmentIterator()
VarSetAssignment object.
assignmentIterator in interface VarSetpublic int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetisEmpty in class java.util.AbstractCollectionpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.AbstractCollectionpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.AbstractCollectionpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.SethashCode in class java.util.AbstractSetpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.SetcontainsAll in class java.util.AbstractCollectionpublic boolean containsAll(BitVarSet bsc)
public VarSet intersection(VarSet c)
VarSet
intersection in interface VarSetpublic int intersectionSize(BitVarSet bsc)
bsc - Other clique to intersect withpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class java.util.AbstractCollectionpublic boolean hasLabel()
public java.lang.String getLabel()
public java.lang.String toString()
toString in class java.util.AbstractCollectionpublic void setLabel(java.lang.String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||