Class DiagonalGenerator

java.lang.Object
org.apache.sedona.common.spider.DiagonalGenerator
All Implemented Interfaces:
Iterator<org.locationtech.jts.geom.Geometry>, Generator

public class DiagonalGenerator extends Object
Generates geometries that are distributed according to the Diagonal distribution
  • Constructor Details

  • Method Details

    • generateCoordinate

      protected org.locationtech.jts.geom.Coordinate generateCoordinate()
    • bernoulli

      protected int bernoulli(double p)
      Generate a random value {0, 1} from a bernoulli distribution with parameter p
    • uniform

      protected double uniform(double a, double b)
      Generate a random value in the range [a, b) from a uniform distribution
    • normal

      protected double normal(double mu, double sigma)
      Generate a random number in the range (-inf, +inf) from a normal distribution
    • dice

      protected int dice(int n)
      Generate a random integer in the range [1, n]
    • dice

      protected int dice(int min, int max)
      Generate a random integer in the given range
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<org.locationtech.jts.geom.Geometry>
    • next

      public org.locationtech.jts.geom.Geometry next()
      Specified by:
      next in interface Iterator<org.locationtech.jts.geom.Geometry>
    • generatePoint

      protected org.locationtech.jts.geom.Point generatePoint()
    • generateBox

      protected org.locationtech.jts.geom.Polygon generateBox()
    • generatePolygon

      protected org.locationtech.jts.geom.Polygon generatePolygon()