|
libRoadRunner C API
1.0.0
|
Helper routines for acessing the various C API types, eg lists and arrays. More...
Functions | |
| int | getVectorLength (RRVectorPtr vector) |
| Get the number of elements in a vector type. More... | |
| RRVectorPtr | createVector (int size) |
| Create a new vector with a given size. More... | |
| bool | getVectorElement (RRVectorPtr vector, int index, double *value) |
| Get a particular element from a vector. More... | |
| bool | setVectorElement (RRVectorPtr vector, int index, double value) |
| Set a particular element in a vector. More... | |
| RRDoubleMatrixPtr | createRRMatrix (int r, int c) |
| Create an empty matrix of size r by c. More... | |
| int | getMatrixNumRows (RRDoubleMatrixPtr m) |
| Retrieve the number of rows in the given matrix. More... | |
| int | getMatrixNumCols (RRDoubleMatrixPtr m) |
| Retrieve the number of columns in the given matrix. More... | |
| bool | getMatrixElement (RRDoubleMatrixPtr m, int r, int c, double *value) |
| Retrieve an element at a given row and column from a matrix type variable. More... | |
| bool | setMatrixElement (RRDoubleMatrixPtr m, int r, int c, double value) |
| Set an element at a given row and column with a given value in a matrix type variable. More... | |
| bool | getComplexMatrixElement (RRComplexMatrixPtr m, int r, int c, RRComplexPtr value) |
| Retrieve an element at a given row and column from a complex matrix type variable. More... | |
| bool | setComplexMatrixElement (RRComplexMatrixPtr m, int r, int c, RRComplexPtr value) |
| Set an element at a given row and column with a given value in a complex matrix type variable. More... | |
| RRCDataPtr | createRRCData (RRDataHandle rrData) |
| Create a RoadRunner C data structure (RRCDataPtr) from RoadRunner data. More... | |
| int | getRRDataNumRows (RRCDataPtr rrData) |
| Retrieve the number of rows in the given RoadRunner numberical data (returned from simulate(RRHandle handle)) More... | |
| int | getRRDataNumCols (RRCDataPtr rrData) |
| Retrieve the number of columns in the given rrData data (returned form simulat(RRHandle handle)) More... | |
| bool | getRRCDataElement (RRCDataPtr rrData, int r, int c, double *value) |
| Retrieves an element at a given row and column from a RoadRunner data type variable. More... | |
| char * | getRRDataColumnLabel (RRCDataPtr rrData, int column) |
| Retrieves a label for a given column in a rrData type variable. More... | |
| bool | writeRRData (RRHandle handle, const char *fileNameAndPath) |
| Writes RoadRunner data to file. More... | |
| bool | compileSource (RRHandle handle, const char *sourceFileNameAndPath) |
| Compiles source code. More... | |
Helper routines for acessing the various C API types, eg lists and arrays.
| bool compileSource | ( | RRHandle | handle, |
| const char * | sourceFileNameAndPath | ||
| ) |
Compiles source code.
| handle | Handle to a RRInstance |
| sourceFileNameAndPath | Pointer to string holding the file(with path) to compile |
| RRCDataPtr createRRCData | ( | RRDataHandle | rrData | ) |
Create a RoadRunner C data structure (RRCDataPtr) from RoadRunner data.
| [in] | rrData | A pointer to a RoadRunner numerical data type variable |
| RRDoubleMatrixPtr createRRMatrix | ( | int | r, |
| int | c | ||
| ) |
Create an empty matrix of size r by c.
Matrices are indexed from zero
Example:
| r,c | Row and column sizes |
| RRVectorPtr createVector | ( | int | size | ) |
Create a new vector with a given size.
Vectors are indexed from zero
Example:
| size | The number of element in the new vector |
| bool getComplexMatrixElement | ( | RRComplexMatrixPtr | m, |
| int | r, | ||
| int | c, | ||
| RRComplexPtr | value | ||
| ) |
Retrieve an element at a given row and column from a complex matrix type variable.
Matrices are indexed from zero
Example:
| [in] | m | A pointer to a complex matrix type variable |
| [in] | r | The row index to the matrix |
| [in] | c | The column index to the matrix |
| [out] | value | The retrieved value from the matrix |
| bool getMatrixElement | ( | RRDoubleMatrixPtr | m, |
| int | r, | ||
| int | c, | ||
| double * | value | ||
| ) |
Retrieve an element at a given row and column from a matrix type variable.
Matrices are indexed from zero
Example:
| [in] | m | A pointer to a matrix type variable |
| [in] | r | The row index to the matrix |
| [in] | c | The column index to the matrix |
| [out] | value | The retrieved value from the matrix |
| int getMatrixNumCols | ( | RRDoubleMatrixPtr | m | ) |
Retrieve the number of columns in the given matrix.
Matrices are indexed from zero
Example:
| m | A pointer to a matrix type variable |
| int getMatrixNumRows | ( | RRDoubleMatrixPtr | m | ) |
Retrieve the number of rows in the given matrix.
Matrices are indexed from zero
Example:
| m | A pointer to a matrix type variable |
| bool getRRCDataElement | ( | RRCDataPtr | rrData, |
| int | r, | ||
| int | c, | ||
| double * | value | ||
| ) |
Retrieves an element at a given row and column from a RoadRunner data type variable.
RoadRunner numerical data are indexed from zero
Example:
| [in] | rrData | A pointer to a rrData type variable |
| [in] | r | -The row index to the rrData data |
| [in] | c | - The column index to the rrData data |
| [out] | value | - The retrieved value from the rrData data |
| char* getRRDataColumnLabel | ( | RRCDataPtr | rrData, |
| int | column | ||
| ) |
Retrieves a label for a given column in a rrData type variable.
Result data are indexed from zero
Example:
| [in] | rrData | A pointer to a rrData type variable |
| [in] | column | - The column index for the rrData data (indexing from zero) |
| int getRRDataNumCols | ( | RRCDataPtr | rrData | ) |
Retrieve the number of columns in the given rrData data (returned form simulat(RRHandle handle))
Example:
| [in] | rrData | A pointer to a rrData type variable |
| int getRRDataNumRows | ( | RRCDataPtr | rrData | ) |
Retrieve the number of rows in the given RoadRunner numberical data (returned from simulate(RRHandle handle))
Example:
| [in] | rrData | A pointer to a RoadRunner numerical data type variable |
| bool getVectorElement | ( | RRVectorPtr | vector, |
| int | index, | ||
| double * | value | ||
| ) |
Get a particular element from a vector.
Vectors are indexed from zero
Example:
| vector | A pointer to the vector variable type |
| index | An integer indicating the ith element to retrieve (indexing is from zero) |
| value | A pointer to the retrieved double value |
| int getVectorLength | ( | RRVectorPtr | vector | ) |
Get the number of elements in a vector type.
Vectors are indexed from zero
Example:
| vector | A pointer to the vector variable type |
| bool setComplexMatrixElement | ( | RRComplexMatrixPtr | m, |
| int | r, | ||
| int | c, | ||
| RRComplexPtr | value | ||
| ) |
Set an element at a given row and column with a given value in a complex matrix type variable.
Matrices are indexed from zero
Example:
| [in] | m | A pointer to a complex matrix type variable |
| [in] | r | The row index to the matrix |
| [in] | c | The column index to the matrix |
| [out] | value | The value to set to the complex matrix element |
| bool setMatrixElement | ( | RRDoubleMatrixPtr | m, |
| int | r, | ||
| int | c, | ||
| double | value | ||
| ) |
Set an element at a given row and column with a given value in a matrix type variable.
Matrices are indexed from zero
Example:
| [in] | m | A pointer to a matrix type variable |
| [in] | r | The row index to the matrix |
| [in] | c | The column index to the matrix |
| [out] | value | The value to set to the matrix element |
| bool setVectorElement | ( | RRVectorPtr | vector, |
| int | index, | ||
| double | value | ||
| ) |
Set a particular element in a vector.
Vectors are indexed from zero
Example:
| vector | A pointer to the vector variable type |
| index | An integer indicating the ith element to set (indexing is from zero) |
| value | The value to store in the vector at the indexth position |
| bool writeRRData | ( | RRHandle | handle, |
| const char * | fileNameAndPath | ||
| ) |
Writes RoadRunner data to file.
| handle | Handle to a Roadrunner Instance |
| fileNameAndPath | Pointer to string holding the file(with path) to write data to |
1.8.5