Documentation of 'edu.uci.ics.jung.algorithms.layout.util.RandomLocationTransformer' Java class
RandomLocationTransformer
edu.uci.ics.jung.algorithms.layout.util

Class RandomLocationTransformer<V>

  • Type Parameters:
    V - the vertex type
    All Implemented Interfaces:
    com.google.common.base.Function<V,java.awt.geom.Point2D>


    public class RandomLocationTransformer<V>
    extends java.lang.Object
    implements com.google.common.base.Function<V,java.awt.geom.Point2D>
    Provides a random vertex location within the bounds of the Dimension property. This provides a random location for unmapped vertices the first time they are accessed.

    Note: the generated values are not cached, so apply() will generate a new random location for the passed vertex every time it is called. If you want a consistent value, wrap this layout's generated values in a StaticLayout instance.

    • Constructor Summary

      Constructors 
      Constructor and Description
      RandomLocationTransformer(java.awt.Dimension d)
      Creates an instance with the specified size which uses the current time as the random seed.
      RandomLocationTransformer(java.awt.Dimension d, long seed)
      Creates an instance with the specified dimension and random seed.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.awt.geom.Point2D apply(V v) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
    • Constructor Detail

      • RandomLocationTransformer

        public RandomLocationTransformer(java.awt.Dimension d)
        Creates an instance with the specified size which uses the current time as the random seed.
        Parameters:
        d - the size of the layout area
      • RandomLocationTransformer

        public RandomLocationTransformer(java.awt.Dimension d,
                                         long seed)
        Creates an instance with the specified dimension and random seed.
        Parameters:
        d - the size of the layout area
        seed - the seed for the internal random number generator
    • Method Detail

      • apply

        public java.awt.geom.Point2D apply(V v)
        Specified by:
        apply in interface com.google.common.base.Function<V,java.awt.geom.Point2D>

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.