Package org.anchoranalysis.spatial.point
Class RunningSumPoint
Object
RunningSumPoint
A running sum for tracking points separately in each dimension.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
countXY()
The count for the X or Y dimensions.long
countZ()
The count for the Z dimension.void
Increments the running-sum by aPoint2d
.void
Increments the running-sum by aPoint2i
.void
Increments the running-sum by aPoint3d
.void
Increments the running-sum by aPoint3i
.mean()
The mean value of all points added to the running-sum, separately for all three-dimensions.meanXY()
The mean value of all points added to the running-sum, only for the X- and Y-dimensions.
-
Constructor Details
-
RunningSumPoint
public RunningSumPoint()
-
-
Method Details
-
increment
Increments the running-sum by aPoint2i
.No impact occurs on the third-dimension of the running-sum.
- Parameters:
point
- the point to add to the running sum.
-
increment
Increments the running-sum by aPoint2d
.No impact occurs on the third-dimension of the running-sum.
- Parameters:
point
- the point to add to the running sum.
-
increment
Increments the running-sum by aPoint3i
.- Parameters:
point
- the point to add to the running sum.
-
increment
Increments the running-sum by aPoint3d
.- Parameters:
point
- the point to add to the running sum.
-
mean
The mean value of all points added to the running-sum, separately for all three-dimensions.- Returns:
- a newly created point, with the mean for each dimension.
-
meanXY
The mean value of all points added to the running-sum, only for the X- and Y-dimensions.- Returns:
- a newly created point, with the mean for X- and Y- dimensions.
-
countXY
public long countXY()The count for the X or Y dimensions.The count is guaranteed to always be the same for either the X or Y dimension.
- Returns:
- the count.
-
countZ
public long countZ()The count for the Z dimension.This is identical to
countXY()
if only 3D points have been added.- Returns:
- the count.
-