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 java.lang.String toString​(RelationshipDistribution distribution)  
      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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 name
        java.lang.NullPointerException - if the argument is null
      • 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 graph
        averageDegree - Expected average degree in the generated graph
        random - 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 graph
        averageDegree - Expected average degree in the generated graph
        random - 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.