union2union2Union2Union2union2 (算子)

名称

union2union2Union2Union2union2 — 返回两个区域的并集。

签名

union2(Region1, Region2 : RegionUnion : : )

Herror union2(const Hobject Region1, const Hobject Region2, Hobject* RegionUnion)

Herror T_union2(const Hobject Region1, const Hobject Region2, Hobject* RegionUnion)

void Union2(const HObject& Region1, const HObject& Region2, HObject* RegionUnion)

HRegion HRegion::Union2(const HRegion& Region2) const

static void HOperatorSet.Union2(HObject region1, HObject region2, out HObject regionUnion)

HRegion HRegion.Union2(HRegion region2)

def union2(region_1: HObject, region_2: HObject) -> HObject

描述

union2union2Union2Union2Union2union2 computes the union of the region in Region1Region1Region1Region1region1region_1 with all regions in Region2Region2Region2Region2region2region_2. Internally, all regions of Region2Region2Region2Region2region2region_2 are united to a single region before the individual regions of Region1Region1Region1Region1region1region_1 are united with the already united region. This means that union2union2Union2Union2Union2union2 is not commutative!

执行信息

参数

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

Region for which the union with all regions in Region2 is to be computed.

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

Regions which should be added to Region1.

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

Resulting regions.

元素数量: RegionUnion == Region1

复杂度

Let F be the sum of all areas of the input regions. Then the runtime complexity is O(log(sqrt(F)) * sqrt(F)).

结果

union2union2Union2Union2Union2union2 始终返回 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>)。如有必要,则抛出异常。

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, connectionconnectionConnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringPouringpouring

可能的后继

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region

替代

union1union1Union1Union1Union1union1

另见

intersectionintersectionIntersectionIntersectionIntersectionintersection, complementcomplementComplementComplementComplementcomplement

模块

基础