public class IsomorphismHashSet extends java.lang.Object implements IsomorphismSet
Graphs should not be modified while they are in an IsomorphismSet. If graphs are modified, the behavior is unspecified.
Constructor and Description |
---|
IsomorphismHashSet()
Creates a new IsomorphismSet instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Graph graph)
Adds a graph to this IsomorphismSet.
|
boolean |
addAll(java.util.Collection<? extends Graph> col)
Adds all graphs in a collection to this IsoMorphismSet.
|
Morphism |
addIsomorphic(Graph graph)
Makes sure that a graph isomorphic to a given graph is present in this
IsomorphismSet.
|
void |
clear()
Removes all elements from this IsomorphismList.
|
boolean |
contains(java.lang.Object graph)
Determines whether this IsomorphismSet contains a graph which is
isomorphic to a given graph.
|
boolean |
containsAll(java.util.Collection<?> col)
Determines whether this IsomorphismSet contains all elements of a given
collection.
|
Morphism |
containsIsomorphic(Graph graph)
Determines whether this IsomorphismSet contains a graph which is
isomorphic to a given graph.
|
boolean |
equals(java.lang.Object o)
Returns whether these two isomorphism sets contain the same elements
(modulo isomorphism).
|
int |
hashCode()
Returns the hash code of this IsomorphismSet.
|
boolean |
isEmpty()
Determines whether this Isomorphism set is empty.
|
java.util.Iterator<Graph> |
iterator()
Returns an iterator which iterates over the elements of this
IsomorphismSet.
|
boolean |
remove(java.lang.Object o)
Removes the specified element from this IsomorphismSet.
|
boolean |
removeAll(java.util.Collection<?> col)
Removes all elements of a specified collection from this IsomorphismSet.
|
boolean |
retainAll(java.util.Collection<?> col)
Removes all elements which do not have an isomorphic graph in a given
collection.
|
int |
size()
Returns the number of graphs in this IsomorphismSet.
|
java.lang.Object[] |
toArray()
Returns an array containing all the graphs in this IsomorphismSet.
|
<T> T[] |
toArray(T[] arr)
Returns an array containing all the graphs in this IsomorphismSet.
|
public IsomorphismHashSet()
public java.util.Iterator<Graph> iterator()
public boolean add(Graph graph)
add
in interface java.util.Collection<Graph>
add
in interface java.util.Set<Graph>
graph
- graph to be added to this IsomorphismSettrue
if the set changed because of the call,
false
if not (that is, an isomorphic graph is already
in the set)java.lang.NullPointerException
- if graph
is null
public Morphism addIsomorphic(Graph graph)
addIsomorphic
in interface IsomorphismSet
graph
- graph to be added to this IsomorphismSetgraph
to an isomorphic graph in this
setpublic boolean addAll(java.util.Collection<? extends Graph> col)
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> col)
public boolean retainAll(java.util.Collection<?> col)
public Morphism containsIsomorphic(Graph graph)
containsIsomorphic
in interface IsomorphismSet
graph
- graph to find in the IsomorphismSetgraph
to an isomorphic graph in this set,
or null
if no isomorphic graph was foundpublic boolean contains(java.lang.Object graph)
public boolean containsAll(java.util.Collection<?> col)
public void clear()
public boolean isEmpty()
public int size()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] arr)
public int hashCode()
public boolean equals(java.lang.Object o)