jcommon.graph
Interface ITopologicalSortInput<TVertex extends IVertex>

Type Parameters:
TVertex - Type of IVertex.
All Known Implementing Classes:
TopologicalSortInput

public interface ITopologicalSortInput<TVertex extends IVertex>

Aggregates the output of out neighbor vertices as input to a vertex being processed.


Method Summary
 boolean containsVertex(TVertex vertex)
          Returns a boolean indicating if the input contains a key for the provided vertex.
 Object get(TVertex vertex)
          Gets the output of an out neighbor vertex.
 Object[] getInputs()
          Generates an array of the in-degree neighbor outputs as inputs for a vertex being processed.
 Iterable<Object> inputs()
          Generates an instance of Iterable that allows traversing the contents of the input.
 boolean isEmpty()
          Determines if the input is empty.
 int size()
          The size of the ITopologicalSortInput.
 

Method Detail

isEmpty

boolean isEmpty()
Determines if the input is empty.

Returns:
true if the input is empty; false otherwise.

get

Object get(TVertex vertex)
Gets the output of an out neighbor vertex.

Parameters:
vertex - The vertex whose output is desired.

size

int size()
The size of the ITopologicalSortInput. This is the same as the number of in-degree vertices in the IAdjacencyList.

Returns:
An int representing the size of the ITopologicalSortInput.

containsVertex

boolean containsVertex(TVertex vertex)
Returns a boolean indicating if the input contains a key for the provided vertex.

Parameters:
vertex - The vertex for whom membership will be tested.
Returns:
true if the provided vertex instance is a member of the input; false otherwise.

inputs

Iterable<Object> inputs()
Generates an instance of Iterable that allows traversing the contents of the input.

Returns:
An instance of Iterable for traversing the contents of the input.

getInputs

Object[] getInputs()
Generates an array of the in-degree neighbor outputs as inputs for a vertex being processed.

Returns:
An array of the in-degree neighbor outputs as inputs for a vertex being processed.


Copyright © 2012-2013. All Rights Reserved.