V
- Vertex typepublic class WeightedRandomWalkGraphIteratorProvider<V> extends java.lang.Object implements GraphWalkIteratorProvider<V>
IGraph<?,? extends Number>
),
split up the generation of weighted random walks for parallel learning. Specifically: with N threads and V vertices:
- First iterator generates weighted random walks starting at vertices 0 to V/N
- Second iterator generates weighted random walks starting at vertices V/N+1 to 2*V/N
- and so onWeightedRandomWalkIterator
Constructor and Description |
---|
WeightedRandomWalkGraphIteratorProvider(IGraph<V,? extends java.lang.Number> graph,
int walkLength) |
WeightedRandomWalkGraphIteratorProvider(IGraph<V,? extends java.lang.Number> graph,
int walkLength,
long seed,
NoEdgeHandling mode) |
Modifier and Type | Method and Description |
---|---|
java.util.List<GraphWalkIterator<V>> |
getGraphWalkIterators(int numIterators)
Get a list of GraphWalkIterators.
|
public WeightedRandomWalkGraphIteratorProvider(IGraph<V,? extends java.lang.Number> graph, int walkLength)
public WeightedRandomWalkGraphIteratorProvider(IGraph<V,? extends java.lang.Number> graph, int walkLength, long seed, NoEdgeHandling mode)
public java.util.List<GraphWalkIterator<V>> getGraphWalkIterators(int numIterators)
GraphWalkIteratorProvider
getGraphWalkIterators
in interface GraphWalkIteratorProvider<V>
numIterators
- Number of iterators to return