Class RegionFactory<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
java.lang.Object
org.hipparchus.geometry.partitioning.RegionFactory<S,P,H,I>
- Type Parameters:
S
- Type of the space.P
- Type of the points in space.H
- Type of the hyperplane.I
- Type of the sub-hyperplane.
public class RegionFactory<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
extends Object
This class is a factory for
Region
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildConvex
(H... hyperplanes) Build a convex region from a collection of bounding hyperplanes.Compute the difference of two regions.Get the complement of the region (exchanged interior/exterior).Compute the intersection of two regions.Compute the union of two regions.Compute the symmetric difference (exclusive or) of two regions.
-
Constructor Details
-
Method Details
-
buildConvex
Build a convex region from a collection of bounding hyperplanes.- Parameters:
hyperplanes
- collection of bounding hyperplanes- Returns:
- a new convex region, or null if the collection is empty
-
union
Compute the union of two regions.- Parameters:
region1
- first region (will be unusable after the operation as parts of it will be reused in the new region)region2
- second region (will be unusable after the operation as parts of it will be reused in the new region)- Returns:
- a new region, result of
region1 union region2
-
intersection
Compute the intersection of two regions.- Parameters:
region1
- first region (will be unusable after the operation as parts of it will be reused in the new region)region2
- second region (will be unusable after the operation as parts of it will be reused in the new region)- Returns:
- a new region, result of
region1 intersection region2
-
xor
Compute the symmetric difference (exclusive or) of two regions.- Parameters:
region1
- first region (will be unusable after the operation as parts of it will be reused in the new region)region2
- second region (will be unusable after the operation as parts of it will be reused in the new region)- Returns:
- a new region, result of
region1 xor region2
-
difference
Compute the difference of two regions.- Parameters:
region1
- first region (will be unusable after the operation as parts of it will be reused in the new region)region2
- second region (will be unusable after the operation as parts of it will be reused in the new region)- Returns:
- a new region, result of
region1 minus region2
-
getComplement
Get the complement of the region (exchanged interior/exterior).- Parameters:
region
- region to complement, it will not be modified, a new region independent region will be built- Returns:
- a new region, complement of the specified one
-