fromRawMatrices

Method of CPNTensor.

Static factory that builds a CPNTensor from a signed structure and/or parameter matrix.

Source: src/tensor/@CPNTensor/CPNTensor.m

Syntax

obj = CPNTensor.fromRawMatrices(structureMatrix = S, parameterMatrix = P)
obj = CPNTensor.fromRawMatrices(structureMatrix = S)
obj = CPNTensor.fromRawMatrices(parameterMatrix = P)

Description

fromRawMatrices constructs a CPNTensor from full signed matrices and splits them into the internal three-way components. It applies trueFalseStructure to the structure matrix and trueFalseParameter to the parameter matrix, so a structure entry equal to 11 becomes structureMatrixTrue (all others go to structureMatrixContinuous), and parameter entries equal to +1+1 / 1-1 become parameterMatrixOne / parameterMatrixMinusOne (all others go to parameterMatrixContinuous).

Both arguments default to [], so a matrix that is omitted leaves the corresponding components empty. After the split the tensor rank R is set from the structure matrix.

This is the name–value equivalent of the two-argument constructor CPNTensor(structureMatrix, parameterMatrix).

Input arguments

Argument Description
structureMatrix (name–value, default []) Signed structure matrix, rows = signals, columns = monomials.
parameterMatrix (name–value, default []) Signed parameter matrix, rows = equations, columns = monomials.

Output arguments

Output Description
obj CPNTensor with the split structure and parameter components and rank R.

Example

%                  xp1 xp2 xp3  x2x3  x1   x2  const x1x2
structureMatrix = [ 1   0   0    0    0    0    0    0 ;
                    0   1   0    0    0    0    0    0 ;
                    0   0   1    0    0    0    0    0 ;
                    0   0   0    0    1    0    0    1 ;
                    0   0   0    1    0    1    0    1 ;
                    0   0   0    1    0    0    0    0 ];

parameterMatrix = [-1   0   0   0.4   0    0    0    0 ;
                    0  -1   0    0    1  -1.2   0    0 ;
                    0   0  -1    0    0    0    1   -1 ];

T = CPNTensor.fromRawMatrices(structureMatrix = structureMatrix, ...
                              parameterMatrix = parameterMatrix);

See also

CPNTensor · fromSparseComponents · trueFalseStructure · trueFalseParameter · mdss


MyToolbox Documentation | Generated automatically by CI/CD pipeline