Method

NumCosmoMathMatrixtriang_to_sym

Declaration [src]

void
ncm_matrix_triang_to_sym (
  NcmMatrix* cm,
  gchar UL,
  gboolean zero,
  NcmMatrix* sym
)

Description [src]

Assuming that cm is a triangular square matrix with data on UL side, computes the symmetric matrix $M^\intercal \times M$ if cm is upper triangular or $M\times M^\intercal$ if it is lower triangular.

If zero is TRUE it first sets to zero all elements above/below the diagonal for UL == ‘L’/’U’. It should be TRUE whenever cm has non-zero values at the other side.

Parameters

UL

Type: gchar

Char indicating ‘U’pper or ‘L’ower matrix.

zero

Type: gboolean

Whether it should first set to zero the other side of the matrix.

sym

Type: NcmMatrix

A NcmMatrix to store the result.

The data is owned by the caller of the method.