| 
    libroadrunner C API
    
   | 
 
Helper routines for accessing the various C wrappers types, eg lists and arrays. More...
Functions | |
| C_DECL_SPEC int rrcCallConv | getVectorLength (RRVectorPtr vector) | 
| Get the number of elements in a vector type.  More... | |
| C_DECL_SPEC RRVectorPtr rrcCallConv | createVector (int size) | 
| Create a new vector with a given size.  More... | |
| C_DECL_SPEC int rrcCallConv | getVectorElement (RRVectorPtr vector, int index, double *value) | 
| Get a particular element from a vector.  More... | |
| C_DECL_SPEC int rrcCallConv | setVectorElement (RRVectorPtr vector, int index, double value) | 
| Set a particular element in a vector.  More... | |
| C_DECL_SPEC RRDoubleMatrixPtr rrcCallConv | createRRMatrix (int r, int c) | 
| Create an empty matrix of size r by c.  More... | |
| C_DECL_SPEC int rrcCallConv | getMatrixNumRows (RRDoubleMatrixPtr m) | 
| Retrieve the number of rows in the given matrix.  More... | |
| C_DECL_SPEC int rrcCallConv | getMatrixNumCols (RRDoubleMatrixPtr m) | 
| Retrieve the number of columns in the given matrix.  More... | |
| C_DECL_SPEC int rrcCallConv | getMatrixElement (RRDoubleMatrixPtr m, int r, int c, double *value) | 
| Retrieve an element at a given row and column from a matrix type variable.  More... | |
| C_DECL_SPEC int rrcCallConv | 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... | |
| C_DECL_SPEC int rrcCallConv | 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... | |
| C_DECL_SPEC int rrcCallConv | 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... | |
| C_DECL_SPEC int rrcCallConv | getRRDataNumRows (RRCDataPtr rrData) | 
| Retrieve the number of rows in the given RoadRunner numerical data (returned from simulate(RRHandle handle))  More... | |
| C_DECL_SPEC int rrcCallConv | getRRDataNumCols (RRCDataPtr rrData) | 
| Retrieve the number of columns in the given rrData data (returned form simulate(RRHandle handle))  More... | |
| C_DECL_SPEC int rrcCallConv | 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... | |
| C_DECL_SPEC char *rrcCallConv | getRRDataColumnLabel (RRCDataPtr rrData, int column) | 
| Retrieves a label for a given column in a rrData type variable.  More... | |
| C_DECL_SPEC int rrcCallConv | writeRRData (RRHandle handle, const char *fileNameAndPath) | 
| Writes RoadRunner data to file.  More... | |
| C_DECL_SPEC int rrcCallConv | compileSource (RRHandle handle, const char *sourceFileNameAndPath) | 
| Compiles source code.  More... | |
Helper routines for accessing the various C wrappers types, eg lists and arrays.
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC RRDoubleMatrixPtr rrcCallConv 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 | 
| C_DECL_SPEC RRVectorPtr rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC char* rrcCallConv 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) | 
| C_DECL_SPEC int rrcCallConv getRRDataNumCols | ( | RRCDataPtr | rrData | ) | 
Retrieve the number of columns in the given rrData data (returned form simulate(RRHandle handle))
Example:
| [in] | rrData | A pointer to a rrData type variable | 
| C_DECL_SPEC int rrcCallConv getRRDataNumRows | ( | RRCDataPtr | rrData | ) | 
Retrieve the number of rows in the given RoadRunner numerical data (returned from simulate(RRHandle handle))
Example:
| [in] | rrData | A pointer to a RoadRunner numerical data type variable | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 | 
| C_DECL_SPEC int rrcCallConv 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 |