\( % 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\}} \)

Mkx_PointerDeque_initialize

Initialize a pointer deque.

Ring1_Result
Ring1_PointerDeque_initialize
  (
    Ring1_PointerDeque *pointerDeque,
    int64_t initialCapacity,
    Ring1_AddedCallback *added,
    Ring1_RemovedCallback *removed
  )

This function initializes an uninitialized pointer deque with the specified capacity and the specified "added" and "removed" callbacks.

Parameter variables

pointerDeque
A pointer to the pointer deque.
initialCapacity
The initial capacity of this pointer deque. If this value is negative, the default capacity Ring1_PointerDeque_Capacity_Default is used. This function fails if this value is smaller than Ring1_PointerDeque_Capacity_Least or greater than Ring1_PointerDeque_Capacity_Greatest.
added
A pointer to a Ring1_AddedCallback function or a null pointer. This function is invoked on an element if it is added to the pointer deque.
removed
A pointer to a Ring1_RemovedCallback function or a null pointer. This function is invoked on an element if it is removed from the pointer deque.

Return value

Ring1_Result_Success on success. Ring1_Result_Failure on failure.