HPGCC3 Documentation 3.0 R003

Complex array functions

Functions

SAT_OBJECT sat3_createcarray (SAT_OBJECT where, int rows, int cols)
 Create a complex array object with the given dimensions.
void sat3_carrayput_dbl (SAT_OBJECT array, int row, int col, double rpart, double ipart)
 Set the element of an array to the given value (as a double).
void sat3_carrayput_xreal (SAT_OBJECT array, int row, int col, XREAL *rpart, XREAL *ipart)
 Set the element of an array to the given value (as XREAL's).
void sat3_carrayput_int (SAT_OBJECT array, int row, int col, int rpart, int ipart)
 Set the element of an array to the given value (as int's).
void sat3_carrayput_llong (SAT_OBJECT array, int row, int col, LONGLONG rpart, LONGLONG ipart)
 Set the element of an array to the given value (as long long's).
void sat3_carrayput_decn (SAT_OBJECT array, int row, int col, decNumber *rpart, decNumber *ipart)
 Set the element of an array to the given value (as decNumber's).
BOOL sat3_carrayget_dbl (SAT_OBJECT array, int row, int col, double *rpart, double *ipart)
 Get the element of an array in double format.
BOOL sat3_carrayget_xreal (SAT_OBJECT array, int row, int col, XREAL *rpart, XREAL *ipart)
 Get the element of an array in XREAL format.
BOOL sat3_carrayget_int (SAT_OBJECT array, int row, int col, int *rpart, int *ipart)
 Get the element of an array in (int) format.
BOOL sat3_carrayget_llong (SAT_OBJECT array, int row, int col, LONGLONG *rpart, LONGLONG *ipart)
 Get the element of an array in (long long) format.
BOOL sat3_carrayget_decn (SAT_OBJECT array, int row, int col, decNumber *rpart, decNumber *ipart)
 Get the element of an array in (decNumber) format.
BOOL sat3_carraysize (SAT_OBJECT array, int *rowptr, int *colptr)
 Get the size of a complex array object.

Detailed Description

This group includes all functions used to create/convert/manipulate complex arrays.


Function Documentation

BOOL sat3_carrayget_dbl ( SAT_OBJECT  array,
int  row,
int  col,
double *  rpart,
double *  ipart 
)

Get the element of an array in double format.

Get the element at the given row and column. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartPointer to a variable that will receive the real part.
ipartPointer to a variable that will receive the imaginary part.
Returns:
On return, *rpart and *ipart contain the requested value, or (0+0i) if coordinates fall outside the array. The function returns FALSE if cordinates fall outside of array or the array is invalid. Otherwise returns TRUE.
See also:
sat3_carrayget_xreal sat3_carrayget_decn sat3_carrayget_llong sat3_carrayget_int
BOOL sat3_carrayget_decn ( SAT_OBJECT  array,
int  row,
int  col,
decNumber rpart,
decNumber ipart 
)

Get the element of an array in (decNumber) format.

Get the element at the given row and column. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartPointer to a variable that will receive the real part. The number must have been allocated for at least 12 digits minimum precision.
ipartPointer to a variable that will receive the imaginary part. The number must have been allocated for at least 12 digits minimum precision.
Returns:
On return, *rpart and *ipart contain the requested value, or (0+0i) if coordinates fall outside the array. The function returns FALSE if cordinates fall outside of array or the array is invalid. Otherwise returns TRUE.
See also:
sat3_carrayget_dbl sat3_carrayget_llong sat3_carrayget_int sat3_carrayget_xreal
BOOL sat3_carrayget_int ( SAT_OBJECT  array,
int  row,
int  col,
int *  rpart,
int *  ipart 
)

Get the element of an array in (int) format.

Get the element at the given row and column. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartPointer to a variable that will receive the real part.
ipartPointer to a variable that will receive the imaginary part.
Returns:
On return, *rpart and *ipart contain the requested value, or (0+0i) if coordinates fall outside the array. The function returns FALSE if cordinates fall outside of array or the array is invalid. Otherwise returns TRUE.
See also:
sat3_carrayget_dbl sat3_carrayget_decn sat3_carrayget_llong sat3_carrayget_xreal
BOOL sat3_carrayget_llong ( SAT_OBJECT  array,
int  row,
int  col,
LONGLONG rpart,
LONGLONG ipart 
)

Get the element of an array in (long long) format.

Get the element at the given row and column. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartPointer to a variable that will receive the real part.
ipartPointer to a variable that will receive the imaginary part.
Returns:
On return, *rpart and *ipart contain the requested value, or (0+0i) if coordinates fall outside the array. The function returns FALSE if cordinates fall outside of array or the array is invalid. Otherwise returns TRUE.
See also:
sat3_carrayget_dbl sat3_carrayget_decn sat3_carrayget_int sat3_carrayget_xreal
BOOL sat3_carrayget_xreal ( SAT_OBJECT  array,
int  row,
int  col,
XREAL rpart,
XREAL ipart 
)

Get the element of an array in XREAL format.

Get the element at the given row and column. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartPointer to a variable that will receive the real part.
ipartPointer to a variable that will receive the imaginary part.
Returns:
On return, *rpart and *ipart contain the requested value, or (0+0i) if coordinates fall outside the array. The function returns FALSE if cordinates fall outside of array or the array is invalid. Otherwise returns TRUE.
See also:
sat3_carrayget_dbl sat3_carrayget_decn sat3_carrayget_llong sat3_carrayget_int
void sat3_carrayput_dbl ( SAT_OBJECT  array,
int  row,
int  col,
double  rpart,
double  ipart 
)

Set the element of an array to the given value (as a double).

Set the element at the given row and column to the specified value. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartReal part of the value to store.
ipartImaginary part of the value to store.
See also:
sat3_carrayput_xreal sat3_carrayput_int sat3_carrayput_llong sat3_carrayput_decn
void sat3_carrayput_decn ( SAT_OBJECT  array,
int  row,
int  col,
decNumber rpart,
decNumber ipart 
)

Set the element of an array to the given value (as decNumber's).

Set the element at the given row and column to the specified value. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartReal part of the value to store (pointer to a decNumber).
ipartImaginary part of the value to store (pointer to a decNumber).
See also:
sat3_carrayput_dbl sat3_carrayput_int sat3_carrayput_llong sat3_carrayput_xreal
void sat3_carrayput_int ( SAT_OBJECT  array,
int  row,
int  col,
int  rpart,
int  ipart 
)

Set the element of an array to the given value (as int's).

Set the element at the given row and column to the specified value. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartReal part of the value to store.
ipartImaginary part of the value to store.
See also:
sat3_carrayput_dbl sat3_carrayput_xreal sat3_carrayput_llong sat3_carrayput_decn
void sat3_carrayput_llong ( SAT_OBJECT  array,
int  row,
int  col,
LONGLONG  rpart,
LONGLONG  ipart 
)

Set the element of an array to the given value (as long long's).

Set the element at the given row and column to the specified value. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartReal part of the value to store.
ipartImaginary part of the value to store.
See also:
sat3_carrayput_dbl sat3_carrayput_xreal sat3_carrayput_int sat3_carrayput_decn
void sat3_carrayput_xreal ( SAT_OBJECT  array,
int  row,
int  col,
XREAL rpart,
XREAL ipart 
)

Set the element of an array to the given value (as XREAL's).

Set the element at the given row and column to the specified value. Array coordinates are zero-based, the uppermost element is (0,0). One-dimensional vectors can be treated as either column-vectors or row-vectors. Simply set the row or column coordinate to zero.

Parameters:
arrayA complex array object.
rowRow coordinate of the element,zero-based.
colColumn coordinate, zero-based.
rpartReal part of the value to store (pointer to a XREAL).
ipartImaginary part of the value to store (pointer to a XREAL).
See also:
sat3_carrayput_dbl sat3_carrayput_int sat3_carrayput_llong sat3_carrayput_decn
BOOL sat3_carraysize ( SAT_OBJECT  array,
int *  rowptr,
int *  colptr 
)

Get the size of a complex array object.

Obtain the number of rows and columns in an array object. A one-dimensional array will return 0 columns (one-dimensional arrays are treated as column vectors). A two-dimensional array with a single column will return 1 column.

Parameters:
arrayAn array object.
rowptrA pointer to an integer variable that will receive the number of rows.
colptrA pointer to an integer variable that will receive the number of columns.
Returns:
TRUE on a valid complex array object. When TRUE, *rowptr and *colptr contain a valid number of rows and columns respectively. It returns FALSE otherwise.
See also:
sat3_carrayget_dbl sat3_carrayget_decn sat3_carrayget_llong sat3_carrayget_xreal sat3_carrayget_int
SAT_OBJECT sat3_createcarray ( SAT_OBJECT  where,
int  rows,
int  cols 
)

Create a complex array object with the given dimensions.

Creates a new complex array of the given dimensions. To create 1-dimensional vectors set one of the dimensions to zero. If one of the dimensions is one, it creates a 2-dimensional array with one row or one column, instead of a vector. Initially, the array is filled with (0+0i).

Parameters:
whereDefines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other).
rowsNumber of rows, use zero to create a one-dimensional vector.
colsNumber of columns, use zero to create a one-dimensional vector.
Returns:
SAT_OBJECT with the new array object, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned or 0 if error.
See also:
Object creation and manipulation