Interface DirectPointSetPattern
- All Superinterfaces:
Pattern,QuickPointCountPattern
- All Known Subinterfaces:
DirectPointSetUniformGridPattern
- All Known Implementing Classes:
SimplePattern
Interface, used by Pattern implementations to indicate that
they are direct point-set patterns, i.e. are internally represented as actual sets of points
like Set<Point>.
See also the section "Direct point-set patterns" in the comments to Pattern interface.
If a pattern implements this interface, then there is a guarantee that the following methods work quickly and successfully (without any exceptions):
Pattern.pointCount(),Pattern.largePointCount(),Pattern.isSurelySinglePoint(),Pattern.isSurelyOriginPoint(),Pattern.points(),Pattern.roundedPoints(),Pattern.coordRange(int),Pattern.coordArea(),Pattern.coordMin(),Pattern.coordMax(),Pattern.roundedCoordRange(int),Pattern.roundedCoordArea(),Pattern.round(),UniformGridPattern.gridIndexRange(int)(if it isDirectPointSetUniformGridPattern),UniformGridPattern.gridIndexArea()(if it isDirectPointSetUniformGridPattern),UniformGridPattern.gridIndexMin()(if it isDirectPointSetUniformGridPattern),UniformGridPattern.gridIndexMax()(if it isDirectPointSetUniformGridPattern).
Here "quickly" means O(1) operations for Pattern.pointCount(), Pattern.largePointCount(),
Pattern.isSurelyOriginPoint() methods and O(N) or less operations
(N=pointCount()) for other methods.
Also there is a guarantee in such patterns, that
QuickPointCountPattern.isPointCountVeryLarge() returns false and, so, the number of points can be retrieved
by Pattern.pointCount() method.
If a pattern implements this interface, it never implements RectangularPattern interface.
There is a guarantee, that the following methods (and, in this package, only they) create patterns, implementing this interface:
SimplePatternconstructor,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).
- Author:
- Daniel Alievsky
- See Also:
-
Field Summary
Fields inherited from interface net.algart.math.patterns.Pattern
MAX_COORDINATE -
Method Summary
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, unionDecompositionMethods inherited from interface net.algart.math.patterns.QuickPointCountPattern
isPointCountVeryLarge