MatrixContainer
- class glotaran.optimization.matrix_provider.MatrixContainer(clp_labels: list[str], matrix: ndarray)[source]
Bases:
object
A container of matrix and the corresponding clp labels.
Attributes Summary
Check if the matrix is index dependent.
The clp labels.
The matrix.
Methods Summary
Apply weight on a matrix.
Create a matrix container with a scaled matrix.
Create a matrix container with a weighted matrix.
Methods Documentation
- static apply_weight(matrix: ArrayLike, weight: ArrayLike) ArrayLike [source]
Apply weight on a matrix.
- Parameters:
matrix (ArrayLike) – The matrix.
weight (ArrayLike) – The weight.
- Returns:
The weighted matrix.
- Return type:
ArrayLike
- create_scaled_matrix(scale: float) MatrixContainer [source]
Create a matrix container with a scaled matrix.
- Parameters:
scale (float) – The scale.
- Returns:
The scaled matrix.
- Return type:
- create_weighted_matrix(weight: ArrayLike) MatrixContainer [source]
Create a matrix container with a weighted matrix.
- Parameters:
weight (ArrayLike) – The weight.
- Returns:
The weighted matrix.
- Return type: