|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.mallet.grmm.types.HashVarSet
public class HashVarSet
A clique is a collection of nodes in a graph that are all adjacent. We implement it cheaply by delegating to a HashSet. Created: Wed Sep 17 12:50:01 2003
| Constructor Summary | |
|---|---|
HashVarSet()
Create an empty clique. |
|
HashVarSet(java.util.Collection c)
Create a Clique given a Collection of nodes. |
|
HashVarSet(Variable[] vars)
|
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object object)
|
boolean |
add(java.lang.Object object,
boolean checkSorted)
|
boolean |
addAll(java.util.Collection collection)
|
AssignmentIterator |
assignmentIterator()
Returns an iterator over the assignments to this clique. |
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object object)
|
boolean |
containsAll(java.util.Collection collection)
|
boolean |
equals(java.lang.Object object)
|
Variable |
get(int idx)
Returns the variable in this clique at index idx. |
java.lang.String |
getLabel()
|
int |
hashCode()
|
VarSet |
intersection(VarSet c)
Returns the intersection of two cliques. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
boolean |
remove(java.lang.Object object)
|
boolean |
removeAll(java.util.Collection collection)
|
boolean |
retainAll(java.util.Collection collection)
|
int |
size()
|
java.lang.Object[] |
toArray()
Returns the variables in this clique as an array. |
java.lang.Object[] |
toArray(java.lang.Object[] objectArray)
Returns the variables in this clique as an array. |
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.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HashVarSet()
public HashVarSet(java.util.Collection c)
public HashVarSet(Variable[] vars)
| Method Detail |
|---|
public Variable get(int idx)
VarSet
get in interface VarSetpublic java.lang.String getLabel()
public VarSet intersection(VarSet c)
intersection in interface VarSetpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.SethashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in interface java.util.Collectionequals in interface java.util.Setequals in class java.lang.Objectpublic boolean removeAll(java.util.Collection collection)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Setpublic Variable[] toVariableArray()
VarSet
toVariableArray in interface VarSetpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean addAll(java.util.Collection collection)
addAll in interface java.util.CollectionaddAll in interface java.util.Setpublic java.lang.Object[] toArray(java.lang.Object[] objectArray)
toArray in interface java.util.CollectiontoArray in interface java.util.Setpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Setpublic boolean containsAll(java.util.Collection collection)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Setpublic boolean retainAll(java.util.Collection collection)
retainAll in interface java.util.CollectionretainAll in interface java.util.Setpublic java.lang.Object clone()
clone in class java.lang.Objectpublic boolean add(java.lang.Object object)
add in interface java.util.Collectionadd in interface java.util.Set
public boolean add(java.lang.Object object,
boolean checkSorted)
public boolean contains(java.lang.Object object)
contains in interface java.util.Collectioncontains in interface java.util.Setpublic int size()
size in interface java.util.Collectionsize in interface java.util.Setpublic int weight()
VarSet
weight in interface VarSetpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setpublic boolean remove(java.lang.Object object)
remove in interface java.util.Collectionremove in interface java.util.Setpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Setpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Setpublic AssignmentIterator assignmentIterator()
VarSetAssignment object.
assignmentIterator in interface VarSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||