Back to Adaptive Vision Library website

You are here: Start » Function Reference » Array Set Operators » ArraySymmetricDifference

ArraySymmetricDifference


This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.

Returns an array of elements contained in odd number of the input arrays (without duplicates).

Syntax

void avl::ArraySymmetricDifference
(
	const atl::Array<Type>& inArray1,
	const atl::Array<Type>& inArray2,
	const atl::Optional<atl::Array<Type> >& inArray3,
	const atl::Optional<atl::Array<Type> >& inArray4,
	atl::Array<Type>& outArray
)

Parameters

Name Type Default Description
inArray1 const Array<Type>& First input array
inArray2 const Array<Type>& Second input array
inArray3 const Optional<Array<Type> >& NIL Third input array (optional)
inArray4 const Optional<Array<Type> >& NIL Fourth input array (optional)
outArray Array<Type>& Symmetric difference of the input arrays

Description

The operation computes an array of elements contained in odd number the input arrays. The operation treats arrays as if those were sets, i.e., disregards the repeated elements in the input arrays and computes the result without repeating elements.

Examples

inArray1 = {1,1,1,2,2,3}
inArray2 = {1,1,4}
outArray = {2,3,4}

Remarks

Please note, that this filter can be concretized only with basic data types and structures of such types. Concretizing the filter with a non-comparable complex data type, such as Image or Region, will raise a Domain Error.

Using this filter to compare data of type Real (or structures with this type) may be tricky. It is caused by the fact that very small (unnoticeable) differences in values of such types may lead to unpredictable negative results in comparison of these values.

Errors

Non-comparable complex data type "TypeName" used in ArraySymmetricDifference.

See Also