public class RMatGraph<T extends org.apache.commons.math3.random.RandomGenerator> extends GraphGeneratorBase<LongValue,NullValue,NullValue>
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_A |
static float |
DEFAULT_B |
static float |
DEFAULT_C |
static float |
DEFAULT_NOISE |
static int |
MINIMUM_EDGE_COUNT |
static int |
MINIMUM_VERTEX_COUNT |
parallelism
Constructor and Description |
---|
RMatGraph(ExecutionEnvironment env,
RandomGenerableFactory<T> randomGeneratorFactory,
long vertexCount,
long edgeCount)
A directed power-law multi
graph generated using the
stochastic Recursive Matrix (R-Mat) model. |
Modifier and Type | Method and Description |
---|---|
Graph<LongValue,NullValue,NullValue> |
generate()
Generates the configured graph.
|
RMatGraph<T> |
setConstants(float a,
float b,
float c)
The parameters for recursively subdividing the adjacency matrix.
|
RMatGraph<T> |
setNoise(boolean noiseEnabled,
float noise)
Enable and configure noise.
|
setParallelism
public static final int MINIMUM_VERTEX_COUNT
public static final int MINIMUM_EDGE_COUNT
public static final float DEFAULT_A
public static final float DEFAULT_B
public static final float DEFAULT_C
public static final float DEFAULT_NOISE
public RMatGraph(ExecutionEnvironment env, RandomGenerableFactory<T> randomGeneratorFactory, long vertexCount, long edgeCount)
graph
generated using the
stochastic Recursive Matrix (R-Mat) model.env
- the Flink execution environmentrandomGeneratorFactory
- source of randomnessvertexCount
- number of verticesedgeCount
- number of edgespublic RMatGraph<T> setConstants(float a, float b, float c)
Setting A = B = C = 0.25 emulates the Erdős–Rényi model.
Graph500 uses A = 0.57, B = C = 0.19.
a
- likelihood of source bit = 0, target bit = 0b
- likelihood of source bit = 0, target bit = 1c
- likelihood of source bit = 1, target bit = 0public RMatGraph<T> setNoise(boolean noiseEnabled, float noise)
noiseEnabled
- whether to enable noise perturbationnoise
- strength of noise perturbationpublic Graph<LongValue,NullValue,NullValue> generate()
GraphGenerator
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.