TinkeCell API
1.0.0
C/Python/Octave/Ruby API
|
basic functions for getting and setting matrices, arrays, tables, etc. More...
Functions | |
TCAPIEXPORT tc_matrix | tc_createMatrix (int rows, int cols) |
Create a matrix with the given rows and columns. | |
TCAPIEXPORT tc_table | tc_createTable (int rows, int cols) |
Create a strings table with the given rows and columns. | |
TCAPIEXPORT tc_strings | tc_createStringsArray (int len) |
Create an array of strings. | |
TCAPIEXPORT tc_items | tc_createItemsArray (int len) |
Create an array of items. | |
TCAPIEXPORT double | tc_getMatrixValue (tc_matrix M, int i, int j) |
get i,jth value from a tc_matrix | |
TCAPIEXPORT void | tc_setMatrixValue (tc_matrix M, int i, int j, double d) |
set i,jth value of a tc_matrix | |
TCAPIEXPORT const char * | tc_getRowName (tc_matrix M, int i) |
get ith row name from a tc_matrix | |
TCAPIEXPORT void | tc_setRowName (tc_matrix M, int i, const char *s) |
set ith row name for a tc_matrix | |
TCAPIEXPORT const char * | tc_getColumnName (tc_matrix M, int j) |
get jth column name of a tc_matrix | |
TCAPIEXPORT void | tc_setColumnName (tc_matrix M, int j, const char *s) |
set jth column name of a tc_matrix | |
TCAPIEXPORT const char * | tc_getTableValue (tc_table S, int i, int j) |
get i,j-th string in a table | |
TCAPIEXPORT void | tc_setTableValue (tc_table S, int i, int j, const char *s) |
set i,jth string in a table | |
TCAPIEXPORT const char * | tc_getString (tc_strings S, int i) |
get ith string in array of strings | |
TCAPIEXPORT void | tc_setString (tc_strings S, int i, const char *c) |
set ith string in array of strings | |
TCAPIEXPORT long | tc_getItem (tc_items A, int i) |
get ith long item in array of items | |
TCAPIEXPORT void | tc_setItem (tc_items A, int i, long o) |
set ith long item in array of items | |
TCAPIEXPORT int | tc_getStringIndex (tc_strings A, const char *s) |
get the index of a string in the array | |
TCAPIEXPORT int | tc_getRowIndex (tc_matrix, const char *s) |
get the row number of a row name | |
TCAPIEXPORT int | tc_getColumnIndex (tc_matrix, const char *s) |
get the column number of a column name | |
TCAPIEXPORT void | tc_deleteMatrix (tc_matrix M) |
delete a matrix | |
TCAPIEXPORT void | tc_deleteTable (tc_table M) |
delete a strings table | |
TCAPIEXPORT void | tc_deleteItemsArray (tc_items A) |
delete an array of items | |
TCAPIEXPORT void | tc_deleteStringsArray (tc_strings C) |
delete an array of strings | |
TCAPIEXPORT tc_matrix | tc_appendColumns (tc_matrix A, tc_matrix B) |
combine two matrices by appending their columns. row size must be equal for both matrices | |
TCAPIEXPORT tc_matrix | tc_appendRows (tc_matrix A, tc_matrix B) |
combine two matrices by appending their row. column sizes must be equal for both matrices | |
TCAPIEXPORT tc_matrix | tc_transpose (tc_matrix A) |
transpose a matrix | |
TCAPIEXPORT void | tc_printMatrixToFile (const char *file, tc_matrix M) |
print a matrix to file | |
TCAPIEXPORT void | tc_printOutMatrix (tc_matrix M) |
print a matrix to stdout | |
TCAPIEXPORT void | tc_printTableToFile (const char *file, tc_table M) |
print a table to file | |
TCAPIEXPORT void | tc_printOutTable (tc_table M) |
print a table to stdout |
basic functions for getting and setting matrices, arrays, tables, etc.
TCAPIEXPORT tc_items tc_createItemsArray | ( | int | len | ) |
TCAPIEXPORT tc_matrix tc_createMatrix | ( | int | rows, |
int | cols | ||
) |
Create a matrix with the given rows and columns.
int | number of rows |
int | number of columns |
TCAPIEXPORT tc_strings tc_createStringsArray | ( | int | len | ) |
TCAPIEXPORT tc_table tc_createTable | ( | int | rows, |
int | cols | ||
) |
Create a strings table with the given rows and columns.
int | number of rows |
int | number of columns |
TCAPIEXPORT void tc_deleteItemsArray | ( | tc_items | A | ) |
delete an array of items
&tc_items | pointer to array |
TCAPIEXPORT void tc_deleteMatrix | ( | tc_matrix | M | ) |
delete a matrix
&tc_matrix | pointer to matrix |
TCAPIEXPORT void tc_deleteStringsArray | ( | tc_strings | C | ) |
delete an array of strings
&tc_strings | pointer to array |
TCAPIEXPORT void tc_deleteTable | ( | tc_table | M | ) |
delete a strings table
&tc_table | pointer to table |
TCAPIEXPORT int tc_getColumnIndex | ( | tc_matrix | , |
const char * | s | ||
) |
get the column number of a column name
tc_matrix | matrix |
char* | a string in the matrix |
TCAPIEXPORT const char* tc_getColumnName | ( | tc_matrix | M, |
int | j | ||
) |
TCAPIEXPORT long tc_getItem | ( | tc_items | A, |
int | i | ||
) |
TCAPIEXPORT double tc_getMatrixValue | ( | tc_matrix | M, |
int | i, | ||
int | j | ||
) |
TCAPIEXPORT int tc_getRowIndex | ( | tc_matrix | , |
const char * | s | ||
) |
get the row number of a row name
tc_matrix | matrix |
char* | a string in the matrix |
TCAPIEXPORT const char* tc_getRowName | ( | tc_matrix | M, |
int | i | ||
) |
TCAPIEXPORT const char* tc_getString | ( | tc_strings | S, |
int | i | ||
) |
TCAPIEXPORT int tc_getStringIndex | ( | tc_strings | A, |
const char * | s | ||
) |
get the index of a string in the array
tc_strings | array |
char* | a string in the array |
TCAPIEXPORT const char* tc_getTableValue | ( | tc_table | S, |
int | i, | ||
int | j | ||
) |
get i,j-th string in a table
tc_table | table |
int | row |
int | column |
TCAPIEXPORT void tc_printMatrixToFile | ( | const char * | file, |
tc_matrix | M | ||
) |
print a matrix to file
char* | file name |
tc_matrix |
TCAPIEXPORT void tc_printOutMatrix | ( | tc_matrix | M | ) |
print a matrix to stdout
char* | file name |
tc_matrix |
TCAPIEXPORT void tc_printTableToFile | ( | const char * | file, |
tc_table | M | ||
) |
print a table to file
char* | file name |
tc_table |
TCAPIEXPORT void tc_setColumnName | ( | tc_matrix | M, |
int | j, | ||
const char * | s | ||
) |
TCAPIEXPORT void tc_setItem | ( | tc_items | A, |
int | i, | ||
long | o | ||
) |
set ith long item in array of items
tc_items | array |
int | index |
long | value |
TCAPIEXPORT void tc_setMatrixValue | ( | tc_matrix | M, |
int | i, | ||
int | j, | ||
double | d | ||
) |
TCAPIEXPORT void tc_setRowName | ( | tc_matrix | M, |
int | i, | ||
const char * | s | ||
) |
TCAPIEXPORT void tc_setString | ( | tc_strings | S, |
int | i, | ||
const char * | c | ||
) |
set ith string in array of strings
tc_strings | array |
int | index |
string | value |
TCAPIEXPORT void tc_setTableValue | ( | tc_table | S, |
int | i, | ||
int | j, | ||
const char * | s | ||
) |
set i,jth string in a table
tc_table | table |
int | row |
int | column |
string | value at row,column |