public class SubgraphIterator<E extends Edge,G extends Graph<E>> extends Object implements Iterator<G>, Serializable
This implementation does not store the entire set of possible subgraphs in memory at one time, but may hold some arbitrary number of them in memory and compute the rest as needed.
This class is not thread-safe and does not support the remove()
method.
Constructor and Description |
---|
SubgraphIterator(G g,
int subgraphSize)
Constructs an iterator over all the subgraphs of
g with the
specified subgraph size. |
public SubgraphIterator(G g, int subgraphSize)
g
with the
specified subgraph size.g
- a graphsubgraphSize
- the size of the subgraphs to returnIllegalArgumentException
- if subgraphSize is less than 1 or is
greater than the number of vertices of g
NullPointerException
- if g
is null
Copyright © 2012. All Rights Reserved.