main/sc/source/core/tool/interpr5.cxx
/* Applies a Householder transformation to a column vector Y with is given as
 * Nx1 Matrix. The Vektor u, from which the Householder transformation is build,
 * is the column part in matrix A, with column index C, starting with row
 * index C. A is the result of the QR decomposition as obtained from
 * lcl_CaluclateQRdecomposition.
 */
Applies a Householder transformation to a column vector Y with is given as
Nx1 Matrix. The Vektor u, from which the Householder transformation is build,
is the column part in matrix A, with column index C, starting with row
index C. A is the result of the QR decomposition as obtained from
lcl_CaluclateQRdecomposition.
Applies a Householder transformation to a column vector Y with is given as Nx1 Matrix . The Vektor u from which the Householder transformation is build is the column part in matrix A with column index C starting with row index C . A is the result of the QR decomposition as obtained from lcl_CaluclateQRdecomposition .
void lcl_ApplyHouseholderTransformation(ScMatrixRef pMatA, SCSIZE nC,
                                          ScMatrixRef pMatY, SCSIZE nN)
{
    double fDenominator = lcl_GetColumnSumProduct(pMatA, nC, pMatA, nC, nC, nN);
    double fNumerator = lcl_GetColumnSumProduct(pMatA, nC, pMatY, 0, nC, nN);
    double fFactor = 2.0 * (fNumerator/fDenominator);
    for (SCSIZE row = nC; row < nN; row++)
        pMatY->PutDouble(
                pMatY->GetDouble(row) - fFactor * pMatA->GetDouble(nC,row), row);
}
void lcl_ApplyHouseholderTransformation ( ScMatrixRef pMatA , SCSIZE nC , ScMatrixRef pMatY , SCSIZE nN ) { double fDenominator = lcl_GetColumnSumProduct ( pMatA , nC , pMatA , nC , nC , nN ) ; double fNumerator = lcl_GetColumnSumProduct ( pMatA , nC , pMatY , 0 , nC , nN ) ; double fFactor = 2.0 * ( fNumerator / fDenominator ) ; for ( SCSIZE row = nC ; row < nN ; row ++ ) pMatY -> PutDouble ( pMatY -> GetDouble ( row ) - fFactor * pMatA -> GetDouble ( nC , row ) , row ) ; }
Applies a Householder transformation to a column vector Y with is given as
 Nx1 Matrix.
Applies a Householder transformation to a column vector Y with is given as Nx1 Matrix .
// ScMatrix matrices are zero based, index access (column,row)