Class RmatElementSupplier

  • All Implemented Interfaces:
    Supplier<Set<uk.gov.gchq.gaffer.data.element.Element>>

    public class RmatElementSupplier
    extends Object
    implements Supplier<Set<uk.gov.gchq.gaffer.data.element.Element>>
    This class uses the RMAT random graph generation method (http://www.cs.cmu.edu/~christos/PUBLICATIONS/siam04.pdf) to generate random Elements. The vertices are Longs in the range 0 to a user defined maximum value.

    Each call to get() returns a Set of Elements. If the includeEntities option is true, then the set will contain a single Edge and an Entity for each vertex in the Edge. If the includeEntities option is false, then the set will contain a single Edge.

    By default, the probabilities used for the generation of the edges are the same as those specified in the Graph500 challenge, but other probabilities can be specified if desired.

    • Constructor Detail

      • RmatElementSupplier

        public RmatElementSupplier​(double[] probabilities,
                                   long maxNodeId,
                                   boolean includeEntities)
      • RmatElementSupplier

        public RmatElementSupplier​(long maxNodeId,
                                   boolean includeEntities)
    • Method Detail

      • get

        public Set<uk.gov.gchq.gaffer.data.element.Element> get()
        destination +---+---+ | 0 | 1 | source +---+---+ | 2 | 3 | +---+---+
        Specified by:
        get in interface Supplier<Set<uk.gov.gchq.gaffer.data.element.Element>>