pyrc.tests.test_symbolic#

class TestSparseSymbolicEvaluator(methodName='runTest')#

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_constant_matrix()#

Matrix with only constant entries evaluates correctly.

test_empty_matrix()#

Matrix with no nonzero entries returns a zero matrix.

test_large_sparse_matrix()#

Random 1000x1000 sparse matrix with ~20 entries per row, mixed constant and symbolic, evaluates correctly.

test_mixed_constant_and_symbolic()#

Matrix with mixed constant and symbolic entries evaluates correctly.

test_nonlinear_expression()#

Nonlinear symbolic expressions (sin, cos) are evaluated correctly.

test_shape()#

Evaluator and output matrix have the correct shape.

test_symbolic_multiple_symbols()#

Multiple symbols in multiple entries are evaluated correctly.

test_symbolic_single_entry()#

Single symbolic entry is evaluated and placed correctly alongside a constant.

test_working_matrix_not_modified_between_calls()#

Consecutive calls with different values return correct results without state leakage.