public final class Sorting extends Object
Modifier and Type | Method and Description |
---|---|
static Node[] |
sortNodesByDegree(Graph graph)
Sorts the nodes of a given graph by degree in ascending order.
|
static Node[] |
sortNodesByIntKey(Graph graph,
IDataProvider keys)
Sorts the nodes of a given graph by an integer key associated with each node through a
IDataProvider . |
public static final Node[] sortNodesByDegree(Graph graph)
graph
- the given graphNode
s sorted by degree in ascending orderpublic static final Node[] sortNodesByIntKey(Graph graph, IDataProvider keys)
IDataProvider
.
The nodes are sorted in ascending order.
graph
- the given graphkeys
- the IDataProvider
that returns the keys based on which the nodes will be sortedNode
s sorted by an integer key in ascending order