Chombo + EB  3.2
LSquares Class Reference

`#include <LSquares.H>`

## Public Member Functions

void LeastSquares (Real **A, Vector< Real > &x, const Vector< Real > &rhs)

int gaussElim (Real **A, Vector< Real > &rhs)
gaussian elimination with partial pivoting More...

void swapRows (Real **A, const int &rowi, const int &rowj, const int &numberOfCols)

void swapRows (Vector< Real > &rhs, const int &currRow, const int &pivot)

int findPivot (Real **A, const int &currCol, const int &currRow, const int &numRows, int &pivot)

void addRows (Vector< Real > &rhs, const int &rowi, const Real &alpha, const int &rowj)

void addRows (Real **A, const int &rowi, const Real &alpha, const int &rowj, const int &numberOfCols)

void timesBeta (Vector< Real > &rhs, const int &currRow, const Real &Beta)

void timesBeta (Real **A, const int &rowi, const Real &Beta, const int &numberOfcols)

void transpose (Real **a_A, Real **a_Atrans, const int &a_numRows, const int &a_numCols)

void matMul (Real **a_A, Real **a_B, Real **a_C, const int &a_numRowsA, const int &a_numColsA, const int &a_numColsB)

void backSolve (Real **a_A, const Vector< Real > &a_rhs, const int &a_numArows, Vector< Real > &a_x)

void AtimesX (Real **A, const Vector< Real > &x, const int &numRowsA, Vector< Real > &Ax)

void allocArray (const int &rows, const int &cols, Real **&A)

void freeArray (const int &rows, const int &cols, Real **&A)

void output (const int &rows, const int &cols, Real **&A, char *name)
outputs a matrix A More...

## Detailed Description

This class solves least squares problems

## ◆ LeastSquares()

 void LSquares::LeastSquares ( Real ** A, Vector< Real > & x, const Vector< Real > & rhs )

## ◆ gaussElim()

 int LSquares::gaussElim ( Real ** A, Vector< Real > & rhs )

gaussian elimination with partial pivoting

## ◆ swapRows() [1/2]

 void LSquares::swapRows ( Real ** A, const int & rowi, const int & rowj, const int & numberOfCols )

## ◆ swapRows() [2/2]

 void LSquares::swapRows ( Vector< Real > & rhs, const int & currRow, const int & pivot )

## ◆ findPivot()

 int LSquares::findPivot ( Real ** A, const int & currCol, const int & currRow, const int & numRows, int & pivot )

## ◆ addRows() [1/2]

 void LSquares::addRows ( Vector< Real > & rhs, const int & rowi, const Real & alpha, const int & rowj )

## ◆ addRows() [2/2]

 void LSquares::addRows ( Real ** A, const int & rowi, const Real & alpha, const int & rowj, const int & numberOfCols )

## ◆ timesBeta() [1/2]

 void LSquares::timesBeta ( Vector< Real > & rhs, const int & currRow, const Real & Beta )

## ◆ timesBeta() [2/2]

 void LSquares::timesBeta ( Real ** A, const int & rowi, const Real & Beta, const int & numberOfcols )

## ◆ transpose()

 void LSquares::transpose ( Real ** a_A, Real ** a_Atrans, const int & a_numRows, const int & a_numCols )

## ◆ matMul()

 void LSquares::matMul ( Real ** a_A, Real ** a_B, Real ** a_C, const int & a_numRowsA, const int & a_numColsA, const int & a_numColsB )

## ◆ backSolve()

 void LSquares::backSolve ( Real ** a_A, const Vector< Real > & a_rhs, const int & a_numArows, Vector< Real > & a_x )

## ◆ AtimesX()

 void LSquares::AtimesX ( Real ** A, const Vector< Real > & x, const int & numRowsA, Vector< Real > & Ax )

## ◆ allocArray()

 void LSquares::allocArray ( const int & rows, const int & cols, Real **& A )

## ◆ freeArray()

 void LSquares::freeArray ( const int & rows, const int & cols, Real **& A )

## ◆ output()

 void LSquares::output ( const int & rows, const int & cols, Real **& A, char * name )

outputs a matrix A

The documentation for this class was generated from the following file: