Matrix Sum¶
- class fastmat.Sum¶
Bases:
Matrix
For matrices \(A_k \in \mathbb{C}^{n \times m}\) with \(k = 1,\dots,N\) we define a new mapping \(M\) as the sum
\[M = \sum\limits_{k = 1}^{N} A_k,\]which then also is a mapping in \(\mathbb{C}^{n \times m}\).
>>> # import the package >>> import fastmat as fm >>> >>> # define the components >>> A = fm.Circulant(x_A) >>> B = fm.Circulant(x_B) >>> C = fm.Fourier(n) >>> D = fm.Diag(x_D) >>> >>> # construct the sum of transformations >>> M = fm.Sum(A, B, C, D)
Assume we have two circulant matrices \(A\) and \(B\), an \(N\)-dimensional Fourier matrix \(C\) and a diagonal matrix \(D\). Then we define
\[M = A + B + C + D.\]- __init__()¶
Initialize a Sum matrix instance.
- Parameters
- *matrices
fastmat.Matrix
The matrix instances to be summed.
- **optionsoptional
Additional optional keyworded arguments. Supports all optional arguments supported by
fastmat.Matrix
.
- *matrices