KonaMatrix (base class)¶
-
class
kona.linalg.matrices.common.
KonaMatrix
(primal=None, state=None, transposed=False)[source]¶ Bases:
object
An abstract matrix class connected to Kona memory. This class is used to define a variety of jacobian matrices and other composite objects containing matrix-related methods used in optimization tasks.
Parameters: - primal (DesignVector) –
- state (StateVector) –
- transposed (boolean, optional) –
Variables: - _design (PrimalVector) – Primal vector point for linearization.
- _state (StateVector) – State vector point for linearization
- _transposed (boolean) – Flag to determine if the matrix is transposed
-
T
¶ Returns the transposed version of the matrix.
Returns: KonaMatrix-like Return type: Transposed version of the matrix.
-
linearize
(primal, state)[source]¶ Store the vector points around which a non-linear matrix should be linearized.
Parameters: - primal (DesignVector or CompositePrimalVector) –
- state (StateVector) –
-
product
(in_vec, out_vec)[source]¶ Performs a matrix-vector product at the internally stored linearization.
Parameters: - in_vec (KonaVector) –
- out_vec (KonaVector) –
Returns: out_vec
Return type: