partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicpartition_dynamic划分动态(算子)

名称

partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicpartition_dynamic — 在垂直范围较小的位置水平划分一个区域。

签名

partition_dynamic(Region : Partitioned : Distance, Percent : )

Herror partition_dynamic(const Hobject Region, Hobject* Partitioned, double Distance, double Percent)

Herror T_partition_dynamic(const Hobject Region, Hobject* Partitioned, const Htuple Distance, const Htuple Percent)

void PartitionDynamic(const HObject& Region, HObject* Partitioned, const HTuple& Distance, const HTuple& Percent)

HRegion HRegion::PartitionDynamic(double Distance, double Percent) const

static void HOperatorSet.PartitionDynamic(HObject region, out HObject partitioned, HTuple distance, HTuple percent)

HRegion HRegion.PartitionDynamic(double distance, double percent)

def partition_dynamic(region: HObject, distance: float, percent: float) -> HObject

描述

partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicPartitionDynamicpartition_dynamic partitions the input RegionRegionRegionRegionregionregion horizontally into regions that have an approximate width of DistanceDistanceDistanceDistancedistancedistance. The input region is split at positions where it has a relatively small vertical extent.

The positions where the input region is split are determined by the following approach: First, initial split positions are determined such that they are equally distributed over the horizontal extent of the input region, i.e., such that all the resulting parts would have the same width. For this, the number n of resulting parts is determined by dividing the width of the input region by DistanceDistanceDistanceDistancedistancedistance and rounding the result to the closest integer value. The distance between the initial split positions is now calculated by dividing the width of the input region by n. Note that the distance between these initial split positions is typically not identical to DistanceDistanceDistanceDistancedistancedistance. Then, the final split positions are determined in the neighborhood of the initial split positions such that the input region is split at positions where it has the least vertical extent within this neighborhood. The maximum deviation of the final split position from the initial split position is DistanceDistanceDistanceDistancedistancedistance*PercentPercentPercentPercentpercentpercent*0.01.

The resulting regions are returned in PartitionedPartitionedPartitionedPartitionedpartitionedpartitioned. Note that the input region is only partitioned if its width is larger than 1.5 times DistanceDistanceDistanceDistancedistancedistance

执行信息

参数

RegionRegionRegionRegionregionregion (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Region to be partitioned.

PartitionedPartitionedPartitionedPartitionedpartitionedpartitioned (输出对象)  region-array objectHRegionHObjectHRegionHobject *

Partitioned region.

DistanceDistanceDistanceDistancedistancedistance (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Approximate width of the resulting region parts.

PercentPercentPercentPercentpercentpercent (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Maximum percental shift of the split position.

默认值: 20

建议值: 0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 70.0, 90.0, 100.0

值范围: 0 ≤ Percent Percent Percent Percent percent percent ≤ 100

结果

partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicPartitionDynamicpartition_dynamic 在所有参数正确时返回 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_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectanglepartition_rectangle

另见

intersectionintersectionIntersectionIntersectionIntersectionintersection, smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1smallest_rectangle1, shape_transshape_transShapeTransShapeTransShapeTransshape_trans, clip_regionclip_regionClipRegionClipRegionClipRegionclip_region

模块

基础