|
HPGCC3 Documentation 3.0 R003
|
Functions | |
| SAT_OBJECT | sat3_createrarray (SAT_OBJECT where, int rows, int cols) |
| Create a real array object with the given dimensions. | |
| void | sat3_rarrayput_dbl (SAT_OBJECT array, int row, int col, double value) |
| Set the element of an array to the given value (as a double). | |
| void | sat3_rarrayput_xreal (SAT_OBJECT array, int row, int col, XREAL *value) |
| Set the element of an array to the given value (XREAL). | |
| void | sat3_rarrayput_int (SAT_OBJECT array, int row, int col, int value) |
| Set the element of an array to the given value (int). | |
| void | sat3_rarrayput_llong (SAT_OBJECT array, int row, int col, LONGLONG value) |
| Set the element of an array to the given value (long long). | |
| void | sat3_rarrayput_decn (SAT_OBJECT array, int row, int col, decNumber *value) |
| Set the element of an array to the given value (as a decNumber). | |
| double | sat3_rarrayget_dbl (SAT_OBJECT array, int row, int col) |
| Get the element of an array as a double. | |
| BOOL | sat3_rarrayget_xreal (SAT_OBJECT array, int row, int col, XREAL *result) |
| Get the element of an array as a XREAL. | |
| int | sat3_rarrayget_int (SAT_OBJECT array, int row, int col) |
| Get the element of an array as an (int). | |
| LONGLONG | sat3_rarrayget_llong (SAT_OBJECT array, int row, int col) |
| Get the element of an array as an (long long). | |
| BOOL | sat3_rarrayget_decn (SAT_OBJECT array, int row, int col, decNumber *result) |
| Get the element of an array as a variable precision decNumber. | |
| BOOL | sat3_rarraysize (SAT_OBJECT array, int *rowptr, int *colptr) |
| Get the size of a real array object. | |
This group includes all functions used to create/convert/manipulate real arrays.
| SAT_OBJECT sat3_createrarray | ( | SAT_OBJECT | where, |
| int | rows, | ||
| int | cols | ||
| ) |
Create a real array object with the given dimensions.
Creates a new real 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 zeroes.
| where | Defines 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). |
| rows | Number of rows, use zero to create a one-dimensional vector. |
| cols | Number of columns, use zero to create a one-dimensional vector. |
| double sat3_rarrayget_dbl | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col | ||
| ) |
Get the element of an array as a double.
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| BOOL sat3_rarrayget_decn | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col, | ||
| decNumber * | result | ||
| ) |
Get the element of an array as a variable precision decNumber.
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| result | Pointer to a previously allocated decNumber that will receive the value. The number should have been allocated for at least for 12 digits precision minimum. |
| int sat3_rarrayget_int | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col | ||
| ) |
Get the element of an array as an (int).
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| LONGLONG sat3_rarrayget_llong | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col | ||
| ) |
Get the element of an array as an (long long).
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| BOOL sat3_rarrayget_xreal | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col, | ||
| XREAL * | result | ||
| ) |
Get the element of an array as a XREAL.
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| result | Pointer to a previously allocated XREAL that will receive the value. |
| void sat3_rarrayput_dbl | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col, | ||
| double | value | ||
| ) |
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| value | Real value to store. |
| void sat3_rarrayput_decn | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col, | ||
| decNumber * | value | ||
| ) |
Set the element of an array to the given value (as a decNumber).
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| value | Real value to store (pointer to a decNumber). |
| void sat3_rarrayput_int | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col, | ||
| int | value | ||
| ) |
Set the element of an array to the given value (int).
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| value | Integer value to store. |
| void sat3_rarrayput_llong | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col, | ||
| LONGLONG | value | ||
| ) |
Set the element of an array to the given value (long long).
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| value | Integer value to store. |
| void sat3_rarrayput_xreal | ( | SAT_OBJECT | array, |
| int | row, | ||
| int | col, | ||
| XREAL * | value | ||
| ) |
Set the element of an array to the given value (XREAL).
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.
| array | A real array object. |
| row | Row coordinate of the element,zero-based. |
| col | Column coordinate, zero-based. |
| value | Real value to store (pointer to a XREAL). |
| BOOL sat3_rarraysize | ( | SAT_OBJECT | array, |
| int * | rowptr, | ||
| int * | colptr | ||
| ) |
Get the size of a real 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.
| array | An array object. |
| rowptr | A pointer to an integer variable that will receive the number of rows. |
| colptr | A pointer to an integer variable that will receive the number of columns. |