Package net.algart.math.patterns
Interface QuickPointCountPattern
- All Superinterfaces:
Pattern
- All Known Subinterfaces:
DirectPointSetPattern
,DirectPointSetUniformGridPattern
,RectangularPattern
- All Known Implementing Classes:
SimplePattern
Interface, used by Pattern
implementations to indicate that
they support quick access to the number of points in pattern.
More precisely, if a pattern implements this interface, then there is a guarantee that the following methods work very quickly (O(1) operations) and without any exceptions:
Pattern.pointCount()
,Pattern.largePointCount()
,Pattern.isSurelySinglePoint()
,Pattern.isSurelyOriginPoint()
.
There is a guarantee, that the following methods (and, in this package, only they) create patterns, implementing this interface:
SimplePattern
constructor,Patterns.newPattern(net.algart.math.Point...)
,Patterns.newPattern(java.util.Collection)
,Patterns.newUniformGridPattern(net.algart.math.Point, double[], java.util.Collection)
,Patterns.newIntegerPattern(net.algart.math.IPoint...)
,Patterns.newIntegerPattern(java.util.Collection)
,Patterns.newSphereIntegerPattern(net.algart.math.Point, double)
,Patterns.newEllipsoidIntegerPattern(net.algart.math.Point, double...)
,Patterns.newSurface(Pattern, net.algart.math.functions.Func)
,Patterns.newSpaceSegment(UniformGridPattern, Func, Func, double, double)
,Patterns.newRectangularUniformGridPattern(net.algart.math.Point, double[], net.algart.math.IRange...)
,Patterns.newRectangularIntegerPattern(net.algart.math.IRange...)
,Patterns.newRectangularIntegerPattern(net.algart.math.IPoint, net.algart.math.IPoint)
.
- Author:
- Daniel Alievsky
- See Also:
-
Field Summary
Fields inherited from interface net.algart.math.patterns.Pattern
MAX_COORDINATE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if and only if the number of points in this pattern is greater than Long.MAX_VALUE.Methods inherited from interface net.algart.math.patterns.Pattern
allUnionDecompositions, carcass, coordArea, coordMax, coordMin, coordRange, dimCount, hasMinkowskiDecomposition, isSurelyInteger, isSurelyOriginPoint, isSurelySinglePoint, largePointCount, maxBound, maxCarcassMultiplier, minBound, minkowskiAdd, minkowskiDecomposition, minkowskiSubtract, multiply, pointCount, points, projectionAlongAxis, round, roundedCoordArea, roundedCoordRange, roundedPoints, scale, shift, symmetric, unionDecomposition
-
Method Details
-
isPointCountVeryLarge
boolean isPointCountVeryLarge()Returns true if and only if the number of points in this pattern is greater than Long.MAX_VALUE. In this case,Pattern.pointCount()
returns Long.MAX_VALUE, but you can get the approximate number of points byPattern.largePointCount()
method.There is a guarantee that this method works very quickly (O(1) operations). This method never throws any exceptions.
- Returns:
- true if the number of points in this pattern is greater than Long.MAX_VALUE.
-