Partition

Meshes.partitionFunction
partition([rng], object, method)

Partition object with partition method. Optionally, specify random number generator rng.

source

Uniform

Meshes.UniformPartitionType
UniformPartition(k; shuffle=true)

A method for partitioning objects uniformly into k subsets of approximately equal size. Optionally shuffle the data.

source

Fraction

Meshes.FractionPartitionType
FractionPartition(fraction; shuffle=true)

A method for partitioning objects according to a given fraction. Optionally shuffle elements before partitioning.

source

Block

Meshes.BlockPartitionType
BlockPartition(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ₙ.

source

Bisect-Point

Meshes.BisectPointPartitionType
BisectPointPartition(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.

source

Bisect-Fraction

Meshes.BisectFractionPartitionType
BisectFractionPartition(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.

source

Ball

Meshes.BallPartitionType
BallPartition(radius; metric=Euclidean())

A method for partitioning objects into balls of a given radius using a metric.

source

Plane

Meshes.PlanePartitionType
PlanePartition(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.

source

Direction

Meshes.DirectionPartitionType
DirectionPartition(direction; [tol])

A method for partitioning objects along a given direction with bandwidth tolerance tol.

source

IndexPredicate

Meshes.IndexPredicatePartitionType
IndexPredicatePartition(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

source

PointPredicate

Meshes.PointPredicatePartitionType
PointPredicatePartition(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.

source

Product

Meshes.ProductPartitionType
ProductPartition(first, second)

A method for partitioning objects using the product of first and second partitioning methods.

source

Hierarchical

Meshes.HierarchicalPartitionType
HierarchicalPartition(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.

source