partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglepartition_rectangle划分矩形(算子)
名称
partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglepartition_rectangle — 将一个区域划分为大小大致相等的矩形。
签名
描述
partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectanglepartition_rectangle partitions the input region into
rectangles having an extent of WidthWidthWidthWidthwidthwidth times
HeightHeightHeightHeightheightheight. The rectangles are returned in PartitionedPartitionedPartitionedPartitionedpartitionedpartitioned.
The region is always split into rectangles of
approximately equal size. If this is not possible with the requested
rectangle size, then WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight 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.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
参数
RegionRegionRegionRegionregionregion (输入对象) region(-array) → objectHRegionHObjectHRegionHobject
Region to be partitioned.
PartitionedPartitionedPartitionedPartitionedpartitionedpartitioned (输出对象) region(-array) → objectHRegionHObjectHRegionHobject *
Partitioned region.
WidthWidthWidthWidthwidthwidth (输入控制) extent.x → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Width of the individual rectangles.
HeightHeightHeightHeightheightheight (输入控制) extent.y → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Height of the individual rectangles.
结果
partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectanglepartition_rectangle 在所有参数正确时返回 2 ( H_MSG_TRUE )。当输入为空(未指定区域)时,可设置行为通过算子 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>)set_system("no_object_result",<Result>),当输入区域为空时,可设置行为通过算子 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>)set_system("empty_region_result",<Result>),以及当结果区域为空时,可设置行为通过算子 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">)set_system("store_empty_region",<"true"/"false">)。如有必要,则抛出异常。
可能的前趋
thresholdthresholdThresholdThresholdThresholdthreshold,
connectionconnectionConnectionConnectionConnectionconnection
替代
partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicPartitionDynamicpartition_dynamic
另见
intersectionintersectionIntersectionIntersectionIntersectionintersection,
smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1smallest_rectangle1,
shape_transshape_transShapeTransShapeTransShapeTransshape_trans,
clip_regionclip_regionClipRegionClipRegionClipRegionclip_region
模块
基础