Enum RelationshipDistribution
- java.lang.Object
-
- java.lang.Enum<RelationshipDistribution>
-
- org.neo4j.graphalgo.beta.generator.RelationshipDistribution
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RelationshipDistribution>
public enum RelationshipDistribution extends java.lang.Enum<RelationshipDistribution>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.function.LongUnaryOperator
degreeProducer(long nodeCount, long averageDegree, java.util.Random random)
Produces a unary function which accepts a node id parameter and returns the number of outgoing relationships that should be generated for this node.static RelationshipDistribution
parse(java.lang.Object object)
abstract java.util.function.LongUnaryOperator
relationshipProducer(long nodeCount, long averageDegree, java.util.Random random)
Produces a unary function which accepts a node id parameter and returns another node id to wich the node will be connected.static RelationshipDistribution
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RelationshipDistribution[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNIFORM
public static final RelationshipDistribution UNIFORM
-
RANDOM
public static final RelationshipDistribution RANDOM
-
POWER_LAW
public static final RelationshipDistribution POWER_LAW
-
-
Method Detail
-
values
public static RelationshipDistribution[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RelationshipDistribution c : RelationshipDistribution.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RelationshipDistribution valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
parse
public static RelationshipDistribution parse(java.lang.Object object)
-
degreeProducer
public abstract java.util.function.LongUnaryOperator degreeProducer(long nodeCount, long averageDegree, java.util.Random random)
Produces a unary function which accepts a node id parameter and returns the number of outgoing relationships that should be generated for this node.- Parameters:
nodeCount
- Expected number of nodes in the generated graphaverageDegree
- Expected average degree in the generated graphrandom
- Random instance to be used to generate the number of outgoing relationships- Returns:
- A unary function that accepts a node id and returns that nodes out degree
-
relationshipProducer
public abstract java.util.function.LongUnaryOperator relationshipProducer(long nodeCount, long averageDegree, java.util.Random random)
Produces a unary function which accepts a node id parameter and returns another node id to wich the node will be connected.- Parameters:
nodeCount
- Expected number of nodes in the generated graphaverageDegree
- Expected average degree in the generated graphrandom
- Random instance to be used to generate the other node id- Returns:
- A unary function that accepts a node id and returns another node id to wich a relationship will be created.
-
-