Class RegionBSPTree1D.RegionSizePropertiesVisitor
java.lang.Object
org.apache.commons.geometry.euclidean.oned.RegionBSPTree1D.RegionSizePropertiesVisitor
- All Implemented Interfaces:
BiConsumer<OrientedPoint,
OrientedPoint>
- Enclosing class:
RegionBSPTree1D
private static final class RegionBSPTree1D.RegionSizePropertiesVisitor
extends Object
implements BiConsumer<OrientedPoint,OrientedPoint>
Internal class for calculating size-related properties for a
RegionBSPTree1D
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Number of inside intervals visited.private double
Raw sum of the centroids of each inside interval.private double
The sum of the centroids of each inside interval, scaled by the size of the interval.private double
Total computed size of all inside regions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(OrientedPoint min, OrientedPoint max) Get the computed properties for the region.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiConsumer
andThen
-
Field Details
-
count
private int countNumber of inside intervals visited. -
size
private double sizeTotal computed size of all inside regions. -
rawCentroidSum
private double rawCentroidSumRaw sum of the centroids of each inside interval. -
scaledCentroidSum
private double scaledCentroidSumThe sum of the centroids of each inside interval, scaled by the size of the interval.
-
-
Constructor Details
-
RegionSizePropertiesVisitor
private RegionSizePropertiesVisitor()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceBiConsumer<OrientedPoint,
OrientedPoint>
-
getRegionSizeProperties
Get the computed properties for the region. This must only be called after every inside interval has been visited.- Returns:
- properties for the region
-