SyFi
0.3
|
Go to the source code of this file.
Functions | |
int | main () |
int main | ( | ) |
Definition at line 10 of file tests/cpp/symbol_factory.cpp.
References SyFi::get_symbol(), SyFi::get_symbolic_matrix(), SyFi::get_symbolic_vector(), SyFi::initSyFi(), SyFi::symbol_exists(), SyFi::x, SyFi::y, and SyFi::z.
{ initSyFi(3); assert( symbol_exists("x") ); assert( symbol_exists("y") ); assert( symbol_exists("z") ); ex x1 = get_symbol("x"); ex x2 = get_symbol("x"); ex x3 = get_symbol("x"); assert( is_zero(x2-x1) ); assert( is_zero(x3-x1) ); assert( is_zero( SyFi::x - get_symbol("x") ) ); assert( is_zero( SyFi::y - get_symbol("y") ) ); assert( is_zero( SyFi::z - get_symbol("z") ) ); assert( !symbol_exists("foo") ); cout << get_symbolic_vector(1, "v") << endl; cout << get_symbolic_vector(3, "u") << endl; cout << get_symbolic_vector(11, "w") << endl; cout << get_symbolic_matrix(2, 3, "B") << endl; cout << get_symbolic_matrix(3, 3, "A") << endl; return 0; }