ClassesClasses | | Operators

union2union2Union2Union2 (Operator)

Name

union2union2Union2Union2 — Return the union of two regions.

Signature

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)

Description

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

Execution Information

Parameters

Region1Region1Region1Region1region1 (input_object)  region(-array) objectHRegionHRegionHobject

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

Region2Region2Region2Region2region2 (input_object)  region(-array) objectHRegionHRegionHobject

Regions which should be added to Region1.

RegionUnionRegionUnionRegionUnionRegionUnionregionUnion (output_object)  region(-array) objectHRegionHRegionHobject *

Resulting regions.

Number of elements: RegionUnion == Region1

Complexity

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

Result

union2union2Union2Union2Union2 always returns 2 (H_MSG_TRUE). 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>) and 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>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdThresholdThresholdThreshold, connectionconnectionConnectionConnectionConnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, pouringpouringPouringPouringPouring

Possible Successors

select_shapeselect_shapeSelectShapeSelectShapeSelectShape, disp_regiondisp_regionDispRegionDispRegionDispRegion

Alternatives

union1union1Union1Union1Union1

See also

intersectionintersectionIntersectionIntersectionIntersection, complementcomplementComplementComplementComplement

Module

Foundation


ClassesClasses | | Operators