|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnct.graph.util.EdgeWeightShuffle<NodeType,WeightType>
public class EdgeWeightShuffle<NodeType extends java.lang.Comparable<? super NodeType>,WeightType extends java.lang.Comparable<? super WeightType>>
This class performs a basic Fisher-Yates shuffle of the edge weights. It creates a list of edges and then shuffles the weights within that list.
| Field Summary | |
|---|---|
protected java.util.Random |
rand
|
| Constructor Summary | |
|---|---|
EdgeWeightShuffle(java.util.Random r)
|
|
| Method Summary | |
|---|---|
void |
randomize(Graph<NodeType,WeightType> g)
Basic Fisher-Yates edge weight shuffle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Random rand
| Constructor Detail |
|---|
public EdgeWeightShuffle(java.util.Random r)
| Method Detail |
|---|
public void randomize(Graph<NodeType,WeightType> g)
randomize in interface GraphRandomizer<NodeType extends java.lang.Comparable<? super NodeType>,WeightType extends java.lang.Comparable<? super WeightType>>g - The graph whose edge weights should be shuffled.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||