Class WeightedRandomPath

java.lang.Object
org.graphwalker.core.generator.PathGeneratorBase<StopCondition>
org.graphwalker.core.generator.WeightedRandomPath
All Implemented Interfaces:
PathGenerator<StopCondition>

public class WeightedRandomPath extends PathGeneratorBase<StopCondition>

WeightedRandomPath

The WeightedRandomPath generator will generate a random path through a model, but will select out-edges according to probabilities.

WeightedRandomPath generates a random path, but will take into account Edge.setWeight(java.lang.Double) as a probability. When selecting an edge from the list of all out-edges from a current vertex, the weights of those edges are considered. For example, an edge with the weight 0.5 is given 50% chance of being selected.

Author:
Kristian Karl