11Arrays of Clifford Numbers
11.1 Theory
Arrays of Clifford numbers are created using any of the standard mechanisms provided within the ‘c’ programming language (King 2008) for arrays of other numbers. Arrays may be placed explicitly on the stack or in static storage with pre‐determined size either within the scope of a sub‐routine or globally. They may also be allocated dynamically by invoking standard library routines such as malloc()
.
In any such case, when initialised, the array itself contains only the tokens which link to the internal Clifford memory structures. Copying the tokens from one array of datatype ‘number
’ to another does not duplicate the underlying memory, but only creates two points of access. If something is modified and the token for one of the points of access is updated, the token for the other point of access may be no longer valid. Whether the memory accessed through the second token remains valid or not depends on the particular operations which have occurred. Some operations occur in situ, constructing the results by overwriting memory. Some operations construct the results from new memory and leave the original memory undamaged. Yet other operations use fresh memory for results but damage the contents of the original memory during the process and then recycle it at the end.
Copying tokens from one array to another without duplicating the underlying storage can be achieved by invoking the sub‐routine copy_array()
. To duplicate the underlying memory, ...
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.