Herror ::test_equal_region (
    Hobject Regions1,
    Hobject Regions2
)
HBool HRegion::TestEqualRegion (
    const HRegionArray &Regions2
) const
HBool HRegionArray::TestEqualRegion (
    const HRegionArray &Regions2
) const

Test whether the regions of two objects are identical.

The operator ::test_equal_region compares the regions of the two input parameters. The n-th element in Regions1 is compared to the n-th object in Regions2 (for all n). If all regions are equal and the number of regions is identical the operator ::test_equal_region returns the value TRUE, otherwise FALSE.


Parameters

Regions1 (input_object)
region(-array) -> Hobject: HRegion(Array)
Test regions.

Regions2 (input_object)
region(-array) -> Hobject: HRegion(Array)
Comparative regions.
Number of elements: Regions1 == Regions2


Complexity

If F is the area of a region the runtime complexity is O(1) or O(F) if the result is TRUE, O(F) if the result is FALSE.


Result

The operator ::test_equal_region returns the value H_MSG_TRUE if both object tuples are identical. If the tuples differ in at least one place ::test_equal_region returns H_MSG_FALSE. The behavior in case of empty input (no input objects available) is set via the operator ::set_system('no_object_result',<Result>). If the number of objects differs an exception is raised.


Alternatives

::intersection, ::complement, ::area_center


See also

::test_equal_obj


Return Value

bool


Module

Basic operators



Copyright © 1996-2002 MVTec Software GmbH