java.lang.Object
de.bsommerfeld.pathetic.engine.pathfinder.spatial.SpatialData

public class SpatialData extends Object
The SpatialData class represents the data associated with a grid region. This data includes a Bloom filter used to quickly check if a position is within the region and a set of positions that have been examined by the pathfinder.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpatialData(int bloomFilterSize, double bloomFilterFpp)
    Creates a new SpatialData with the specified Bloom filter settings.
    Creates a new GridRegionData with Bloom filter settings from the provided configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    flod(PathPosition pathPosition)
    First Line of Defence.
    void
    register(PathPosition pathPosition)
    Registers a given path position by adding it to the Bloom filter and marking it as examined within the regional positions set.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpatialData

      public SpatialData(int bloomFilterSize, double bloomFilterFpp)
      Creates a new SpatialData with the specified Bloom filter settings.
      Parameters:
      bloomFilterSize - The size of the Bloom filter
      bloomFilterFpp - The false positive probability of the Bloom filter
    • SpatialData

      public SpatialData(PathfinderConfiguration configuration)
      Creates a new GridRegionData with Bloom filter settings from the provided configuration.
      Parameters:
      configuration - The pathfinder configuration containing Bloom filter settings
  • Method Details

    • register

      public void register(PathPosition pathPosition)
      Registers a given path position by adding it to the Bloom filter and marking it as examined within the regional positions set.
      Parameters:
      pathPosition - The position in the path to be registered. It represents a specific location within the grid region.
    • flod

      public boolean flod(PathPosition pathPosition)
      First Line of Defence. This method first checks the bloom filter if it might contain the provided . If true, it performs an expensive containment check on the examined positions.