14Memory

Apart from one initial block, there is no need to allocate memory. Memory grows as needed. For efficiency, the user can specify when particular variables or intermediate results are no longer required so that unused memory can be reclaimed. Apart from values which are zero, reclamation is not implemented automatically.

14.1 Memory Usage

Variables representing Clifford numbers are identified by tokens of integer value, which are interpreted by the various routines as indexes into a pair of tables not intended for direct access by the user. The tables contain nodes, in the form of internal structural elements (forks) and terminal data elements (leaves), which are assembled, as in Table 14.1, into an indexed extended binary tree. Structural and data nodes are utilised from the tables as needed and reclaimed when the corresponding data are zero or when flagged as no longer required by the user.

Table 14.1 Forks, branches, and leaves of binary tree.

Token Node Structural Fork Left branch  – Token
(Internal) Right branch  – Token
Data Leaf Unit  – Bitmap
(Terminal) Coefficient [ 0 ]  – Real
[ 1 ] – Imaginary

Structural nodes (forks) contain two branches, each of which leads to either another structural or a data node. The data nodes are the leaves at the extremity of the tree's branches. These contain the numerical data values as complex coefficients coupled to a Clifford unit. Nodes also contain indexes; structural information about the ...

Get Numerical Calculations in Clifford Algebra now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.