Symbolic MATRIX


Functions

bool isMATRIX (SatAddr src)
 is the object a MATRIX
SatAddr makeMATRIX (SatAddr obj, unsigned nibbles)
 Allocate space for a MATRIX with "nibbles" data and put a copy of "obj" in it.
void MATRIXinit (SatAddr obj, SatAddr dst)
 Write a new matrix at "dst" and insert a copy of "obj" into it.
int MATRIXnibbles (SatAddr src)
 Return the size in nibbles of the MATRIX at src.
int MATRIXsize (SatAddr src)
 Same as LISTsize() but operates on a MATRIX.
bool MATRIXadd (SatAddr dst, SatAddr obj)
 Same as LISTadd() but operates on a MATRIX.
SatAddr MATRIXcat (SatAddr MATRIX, SatAddr obj)
 Same as LISTcat() but operates on a MATRIX.
SatAddr MATRIXmerge (SatAddr MATRIX1, SatAddr MATRIX2)
 Same as LISTmerge() but operates on a MATRIX.
SatAddr MATRIXencodeV (SatAddr dst,...)
 Same as LISTencode() but operates on a MATRIX.
SatAddr MATRIXencodeN (int n, SatAddr obs[], SatAddr dst)
 Same as LISTencodeN() but operates on a MATRIX.
SatAddr MATRIXfirstOb (SatAddr matrix, SatAddr *iter)
 Same as LISTfirstOb() but operates on a MATRIX.
SatAddr MATRIXnextOb (SatAddr *iter)
 Same as LISTnextOb() but operates on a MATRIX.
SatAddr MATRIXfirstEntry (SatAddr matrix)
 Same as LISTfirstEntry() but operates on a MATRIX.
SatAddr MATRIXnextEntry (SatAddr entry)
 Same as LISTnextEntry() but operates on a MATRIX.

Detailed Description

This is like a list, but with a different prolog and it must have at least one object in it. The routines within the calculator only support including objects of type real, complex, integer, or algebraic, so don't put anything else into a MATRIX.

Most of the functions for a MATRIX work the same as the equivalent LIST functions.


Function Documentation

bool isMATRIX ( SatAddr  src  ) 

is the object a MATRIX

Parameters:
src Saturn address of an object.
Returns:
true if the object at src is a MATRIX.

SatAddr makeMATRIX ( SatAddr  obj,
unsigned  nibbles 
)

Allocate space for a MATRIX with "nibbles" data and put a copy of "obj" in it.

This allocates space for a MATRIC with nibbles data in it and puts an empty list at the beginning of the allocated space.

Parameters:
nibbles the number of nibbles to allocate
obj Saturn address of the object (or pointer to object) to copy into the MATRIX
Returns:
Saturn address of the MATRIX, or zero on error
Warning:
Because of the way space is allocated on the calculator, you must fill the MATRIX up so its size is exactly the number of nibbles allocated. For this reason, you should use this function only when absolutely necessary. Use MATRIXencode() or MATRIXencodeN() to create MATRIXes instead.

void MATRIXinit ( SatAddr  obj,
SatAddr  dst 
)

Write a new matrix at "dst" and insert a copy of "obj" into it.

Parameters:
obj Saturn address of an object or pointer to an object
dst Saturn address of the destination.

int MATRIXnibbles ( SatAddr  src  ) 

Return the size in nibbles of the MATRIX at src.

Parameters:
src the Saturn address of a MATRIX object
Returns:
the size of the MATRIX in nibbles, or zero if src is not a MATRIX


Generated on Sat Apr 3 16:38:31 2010 for HPObjects by  doxygen 1.5.0