\( % Arcus cosine. \def\acos{\cos^{-1}} % Vector projection. \def\projection#1#2{{proj_{#1}\left(#2\right)}} % Vector rejection. \def\rejection#1#2{{rej_{#1}\left(#2\right)}} % Norm. \def\norm#1{{\left\|#1\right\|}} % Cross product. \def\cross#1#2{\mathit{cross}\left(#1,#2\right)} % Dot product. \def\dot#1#2{{#1 \cdot #2}} % Magnitude. \def\mag#1{{\left|#1\right}} \def\group#1{\left(#1\right)}} \def\sbgrp#1{\left\{#1\right\}} \)

Ring1_IsEqualToCallback

The type of an "equal" callback function for collections.

typedef Ring1_Result (Ring1_Collection_IsEqualToCallback)(bool *result, void* first, void *second);

A function of this type can be associated with certain collections. The function will be invoked by the associated collection when elements need to be compared for equality. The pointers to the elements are passed as the 2nd and 3rd argument to the function, a pointer to the variable to assign the result to as its 1st argument. An "isEqualTo" callback function must not mutate the associated pointer collection. One can safely define an "isEqualTo" callback with a more specialized pointer types than void.

Parameter variables

result
A pointer to the bool variable.
left
A pointer to the first element.
right
A pointer to the second element.

Success

*result is assigned true if the elements are equal. Otherwise it is assigned false.

Failure

result is not dereferenced.

Return value

Ring1_Result_Success on success. Ring1_Result_Failure on failure.