Method of CPNTensor.
Static factory that builds a CPNTensor directly from its
six split components.
Source: src/tensor/@CPNTensor/CPNTensor.m
obj = CPNTensor.fromSparseComponents( ...
structureMatrixTrue = ST, ...
structureMatrixFalse = SF, ...
structureMatrixContinuous = SC, ...
parameterMatrixOne = PO, ...
parameterMatrixMinusOne = PM, ...
parameterMatrixContinuous = PC)fromSparseComponents assembles a CPNTensor
from the six pre-split sparse components, without deriving them from a
single signed matrix. It is the name–value equivalent of the
six-argument constructor. Each component defaults to [], so
any omitted part is empty.
The three structure components are stored as sparse matrices (True and False as logical masks, Continuous as numeric weights), and likewise the three parameter components (One and MinusOne logical, Continuous numeric). Their meanings are:
| Component | Factor / coefficient |
|---|---|
structureMatrixTrue |
monomial factor |
structureMatrixFalse |
complemented factor |
structureMatrixContinuous |
general factor |
parameterMatrixOne |
coefficient |
parameterMatrixMinusOne |
coefficient |
parameterMatrixContinuous |
any other coefficient value |
After assembly, mustHaveDisjointStructure verifies that
the three structure components have non-overlapping support (each entry
sourced from at most one of True / False / Continuous); it errors with
the offending (row, column) positions otherwise. The tensor rank
R is then set from the structure matrix.
Use this factory when the components are already separated — for
example, when a model needs a structureMatrixFalse
(complemented factors
),
which the signed-matrix routes never populate.
All are name–value arguments, each defaulting to [].
| Argument | Description |
|---|---|
structureMatrixTrue |
Logical mask of factors , signals by monomials. |
structureMatrixFalse |
Logical mask of factors , signals by monomials. |
structureMatrixContinuous |
Numeric weights for general factors, signals by monomials. |
parameterMatrixOne |
Logical mask of coefficient , equations by monomials. |
parameterMatrixMinusOne |
Logical mask of coefficient , equations by monomials. |
parameterMatrixContinuous |
Numeric remaining coefficients, equations by monomials. |
| Output | Description |
|---|---|
obj |
CPNTensor with the given components and rank
R. |
CPNTensor · fromRawMatrices
· trueFalseStructure
· trueFalseParameter
· mdss
MyToolbox Documentation | Generated automatically by CI/CD pipeline