dubfi.tests.test_linalg_types¶
Test basic linear algebra in dubfi.linalg.types.
Added in version 0.1.1.
Classes¶
Basic implementation of Operator for testing generic methods. |
Functions¶
Test methods for generic operators. |
Module Contents¶
- class dubfi.tests.test_linalg_types.BasicOperator(data)¶
Bases:
dubfi.linalg.types.OperatorBasic implementation of Operator for testing generic methods.
- Parameters:
data (numpy.ndarray)
- apply(vec)¶
Apply operator on vector: self @ vec.
- rapply(vec)¶
Apply transpose operator on vector: self.T @ vec.
- solve(vec)¶
Solve linear equation self @ x = vec for x.
- __mul__(other)¶
Multiply element-wise.
- Parameters:
other (numpy.ndarray | float)
- Return type:
- __rmul__(other)¶
Multiply element-wise.
- Parameters:
other (numpy.ndarray | float)
- Return type:
- tonumpy()¶
Numpy array (matrix) representation of self.
- logdet()¶
Compute log(det(self)) assuming that self is a positive definite, real-symmetric matrix.
- dubfi.tests.test_linalg_types.test_basic_operator()¶
Test methods for generic operators.