public class IsomorphicSet<G extends Graph<? extends Edge>> extends AbstractSet<G> implements Serializable
Set
of Graph
instances that maintains the invariant that
all graphs in the set are non-isomorphisms of each other. In essenence, two
graphs are treated as being equal if they are isomorphic, rather than if
their Object equality
is true
.
By default, this class only considers two graphs isomorphic if they are
structurally isomorphic (which includes edge directions). However, this
class provides an overloaded constructor to specify a custom IsomorphismTester
, which allows further refinements to which graphs are
considered isomorphic.
Constructor and Description |
---|
IsomorphicSet()
Creates an empty set of structurally isomorphic graphs
|
IsomorphicSet(Collection<? extends G> graphs)
Creates a set of structurally isomorphic graphs from those in the
provided collection.
|
IsomorphicSet(IsomorphismTester tester)
Creates an empty set of isomorphic graphs whose isomorphism is measured
according to the provided tester's isomorphic constraints.
|
IsomorphicSet(IsomorphismTester tester,
Collection<? extends G> graphs)
Creates an empty set of isomorphic graphs from those in the collection
using the provided tester's isomorphic constraints.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(G graph) |
boolean |
contains(Object o) |
Iterator<G> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
equals, hashCode, removeAll
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray, toString
public IsomorphicSet()
public IsomorphicSet(IsomorphismTester tester)
public IsomorphicSet(Collection<? extends G> graphs)
public IsomorphicSet(IsomorphismTester tester, Collection<? extends G> graphs)
public boolean add(G graph)
public boolean contains(Object o)
public Iterator<G> iterator()
iterator
in interface Iterable<G extends Graph<? extends Edge>>
iterator
in interface Collection<G extends Graph<? extends Edge>>
iterator
in interface Set<G extends Graph<? extends Edge>>
iterator
in class AbstractCollection<G extends Graph<? extends Edge>>
public boolean remove(Object o)
Copyright © 2012. All Rights Reserved.