updateRank

Method of CPNTensor.

Refresh the stored tensor rank R from the current structure matrix.

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

Syntax

obj = obj.updateRank()

Description

updateRank recomputes the read-only rank property R and returns the updated tensor. The rank equals the number of monomial columns of the structure matrix:

obj.R = size(obj.structureMatrixTrue, 2);

Because R has protected write access, this method is the way to bring it back in sync after the structure components have been changed directly (for example after adding or removing monomial columns). The constructors and the static factories already set R, so updateRank is only needed when the component matrices are edited afterwards.

Input arguments

Argument Description
obj CPNTensor whose rank should be refreshed.

Output arguments

Output Description
obj CPNTensor with R set to the current number of monomial columns.

See also

CPNTensor · fromRawMatrices · fromSparseComponents


MyToolbox Documentation | Generated automatically by CI/CD pipeline