_MatrixOperation
it.grypho.scala.leonardo.matrix._MatrixOperation
trait _MatrixOperation extends _Expression
Marker trait for matrix-valued AST nodes.
Evaluation is two-path: when both operands reduce to dense _MatrixValues the dense kernels in _MatrixValue are used (fast path); otherwise, matrix literals combine element-wise via the sumOf/productOf helpers, and the resulting _Matrix collapses to a dense value when every element folded, or stays symbolic otherwise.
Dimension mismatches and non-finite results are domain errors and stay symbolic, exactly like x/0 in scalar.Ratio.
Not every matrix-related node extends _MatrixOperation: Determinant and _MatrixIndex produce scalar results, so they extend _Expression directly to prevent the parser from treating 2 * det(A) as a matrix scale.
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
class IdentityMatrixclass Inverseclass MatProductclass MatScaleclass MatSumclass Transposeclass ZeroMatrixclass _MatrixExponential
Members list
In this article