public static class WeightedWalker.Builder<T extends SequenceElement> extends RandomWalker.Builder<T>
alpha, noEdgeHandling, seed, sourceGraph, walkDirection, walkLength
Constructor and Description |
---|
Builder(IGraph<T,? extends java.lang.Number> sourceGraph) |
Modifier and Type | Method and Description |
---|---|
WeightedWalker<T> |
build()
This method builds RandomWalker instance
|
WeightedWalker.Builder<T> |
setNoEdgeHandling(NoEdgeHandling handling)
This method defines walker behavior when it gets to node which has no next nodes available
Default value: RESTART_ON_DISCONNECTED
|
RandomWalker.Builder<T> |
setRestartProbability(double alpha)
This method defines a chance for walk restart
Good value would be somewhere between 0.03-0.07
|
WeightedWalker.Builder<T> |
setSeed(long seed)
This method specifies random seed.
|
WeightedWalker.Builder<T> |
setWalkDirection(WalkDirection direction)
This method defines next hop selection within walk
|
WeightedWalker.Builder<T> |
setWalkLength(int walkLength)
This method specifies output sequence (walk) length
|
public WeightedWalker.Builder<T> setWalkLength(int walkLength)
setWalkLength
in class RandomWalker.Builder<T extends SequenceElement>
walkLength
- public WeightedWalker.Builder<T> setNoEdgeHandling(@NonNull NoEdgeHandling handling)
setNoEdgeHandling
in class RandomWalker.Builder<T extends SequenceElement>
handling
- public WeightedWalker.Builder<T> setSeed(long seed)
setSeed
in class RandomWalker.Builder<T extends SequenceElement>
seed
- public WeightedWalker.Builder<T> setWalkDirection(@NonNull WalkDirection direction)
setWalkDirection
in class RandomWalker.Builder<T extends SequenceElement>
direction
- public RandomWalker.Builder<T> setRestartProbability(double alpha)
setRestartProbability
in class RandomWalker.Builder<T extends SequenceElement>
alpha
- public WeightedWalker<T> build()
RandomWalker.Builder
build
in class RandomWalker.Builder<T extends SequenceElement>