findSingleMatElement: Find a single element of a symmetric matrix based on a...

Description Usage Arguments Value

Description

Given a flattened vector representation of a symmatric matrix findSingleMatElement computes the row and column indices in the original matrix of a given element. The element is given by the index of the flattened vector. The flattened vector is a vector that contains all elements of the lower triangular part of the matrix including all diagonal elements. The order in which the elements are written to the vector is going through each row and copying each element from column one up to the diagonal element of that row into the flattened vector.

Usage

1
findSingleMatElement(pnElementIdx, pvFlatVec, pvIds = NULL)

Arguments

pnElementIdx

Vector index of element to be searched for

pvFlatVec

Flattened vector represenation of symmetric matrix

pvIds

Optional vector of Ids, if !is.na(pvIds), then they are added to result

Value

lResultList Result list with components nRowIndex, nColIndex and nCoefficient


charlotte-ngs/rgrm documentation built on May 13, 2019, 3:34 p.m.