public class SimpleGraphIterator<T,E extends TypedEdge<T>> extends Object implements Iterator<Multigraph<T,E>>, Serializable
SubgraphIterator
,
Serialized FormConstructor and Description |
---|
SimpleGraphIterator(Multigraph<T,E> g,
int subgraphSize)
Constructs an iterator over all the subgraphs of
g with the
specified subgraph size. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if there is at least one more simple graph to return.
|
Multigraph<T,E> |
next()
Returns the next simple graph from the multigraph.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public SimpleGraphIterator(Multigraph<T,E> g, int subgraphSize)
g
with the
specified subgraph size.g
- a multigraphsubgraphSize
- 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
public boolean hasNext()
public Multigraph<T,E> next()
public void remove()
UnsupportedOperationException
if called.Copyright © 2012. All Rights Reserved.