partition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle (Operator)
Name
partition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle
— Partition a region into rectangles of approximately equal size.
Signature
Description
partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectangle
partitions the input region into
rectangles having an extent of WidthWidthWidthWidthwidth
times
HeightHeightHeightHeightheight
. The rectangles are returned in PartitionedPartitionedPartitionedPartitionedpartitioned
.
The region is always split into rectangles of
approximately equal size. If this is not possible with the requested
rectangle size, then WidthWidthWidthWidthwidth
and HeightHeightHeightHeightheight
are adapted so that
the size of the resulting rectangles is approximately equal. If the region is
smaller than the given size, its output remains unchanged. A partition is
only done if the size of the region is at least 1.5 times the size of the
rectangle given by the parameters.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
Parameters
RegionRegionRegionRegionregion
(input_object) region(-array) →
objectHRegionHRegionHobject
Region to be partitioned.
PartitionedPartitionedPartitionedPartitionedpartitioned
(output_object) region(-array) →
objectHRegionHRegionHobject *
Partitioned region.
WidthWidthWidthWidthwidth
(input_control) extent.x →
HTupleHTupleHtuple (real) (double) (double) (double)
Width of the individual rectangles.
HeightHeightHeightHeightheight
(input_control) extent.y →
HTupleHTupleHtuple (real) (double) (double) (double)
Height of the individual rectangles.
Result
partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectangle
returns 2 (H_MSG_TRUE) if all parameters are
correct. The behavior in case of empty input (no regions given) can
be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)
,
the behavior in case of an empty input region via
set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)
,
and the behavior in case of an empty result region via
set_system('store_empty_region',<'true'/'false'>)set_system("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)
.
If necessary, an exception is raised.
Possible Predecessors
thresholdthresholdThresholdThresholdThreshold
,
connectionconnectionConnectionConnectionConnection
Alternatives
partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicPartitionDynamic
See also
intersectionintersectionIntersectionIntersectionIntersection
,
smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1
,
shape_transshape_transShapeTransShapeTransShapeTrans
,
clip_regionclip_regionClipRegionClipRegionClipRegion
Module
Foundation