Partition
Meshes.partition — Functionpartition([rng], object, method)Partition object with partition method. Optionally, specify random number generator rng.
Meshes.PartitionMethod — TypePartitionMethodA method for partitioning domain/data objects.
Uniform
Meshes.UniformPartition — TypeUniformPartition(k; shuffle=true)A method for partitioning objects uniformly into k subsets of approximately equal size. Optionally shuffle the data.
Fraction
Meshes.FractionPartition — TypeFractionPartition(fraction; shuffle=true)A method for partitioning objects according to a given fraction. Optionally shuffle elements before partitioning.
Block
Meshes.BlockPartition — TypeBlockPartition(sides; neighbors=false)A method for partitioning objects into blocks of given sides. Optionally, compute the neighbors of a block as the metadata.
BlockPartition(side₁, side₂, ..., sideₙ; neighbors=false)Alternatively, specify the sides side₁, side₂, ..., sideₙ.
Bisect-Point
Meshes.BisectPointPartition — TypeBisectPointPartition(normal, point)A method for partitioning objects into two half spaces defined by a normal direction and a reference point.
The first half space contains elements to the "left" of the bisecting plane, while the second half space contains elements to the "right" of the bisecting plane.
Bisect-Fraction
Meshes.BisectFractionPartition — TypeBisectFractionPartition(normal; fraction=0.5, maxiter=10)A method for partitioning objects into two half spaces defined by a normal direction and a fraction of points. The partition is returned within maxiter bisection iterations.
Ball
Meshes.BallPartition — TypeBallPartition(radius; metric=Euclidean())A method for partitioning objects into balls of a given radius using a metric.
Plane
Meshes.PlanePartition — TypePlanePartition(normal; [tol])A method for partitioning objects into a family of hyperplanes defined by a normal direction. Two points pᵢ and pⱼ belong to the same hyperplane when (pᵢ - pⱼ) ⋅ normal < tol.
Direction
Meshes.DirectionPartition — TypeDirectionPartition(direction; [tol])A method for partitioning objects along a given direction with bandwidth tolerance tol.
IndexPredicate
Meshes.IndexPredicatePartition — TypeIndexPredicatePartition(pred)A method for partitioning objects with a given predicate function. Two linear indices i and j are part of the same subset whenever pred(i, j) == true
PointPredicate
Meshes.PointPredicatePartition — TypePointPredicatePartition(pred)A method for partitioning objects with a given point predicate function. Two points pᵢ and pⱼ are part of the same subset whenever pred(pᵢ, pⱼ) == true.
Product
Meshes.ProductPartition — TypeProductPartition(first, second)A method for partitioning objects using the product of first and second partitioning methods.
Hierarchical
Meshes.HierarchicalPartition — TypeHierarchicalPartition(first, second)A partitioning method in which a first partition is applied and then a second partition is applied to each subset of the first.