#include "spconfig.h"
#include "spmatrix.h"
Go to the source code of this file.
Defines | |
#define | NORM(a) (nr = ABSS((a).Real), ni = ABSS((a).Imag), MAX (nr,ni)) |
#define | SLACK 1e4 |
#define | spINSIDE_SPARSE |
Functions | |
static int | CountTwins (MatrixPtr Matrix, int Col, ElementPtr *ppTwin1, ElementPtr *ppTwin2) |
void | spcLinkRows (MatrixPtr Matrix) |
double | spCondition (MatrixPtr Matrix, double NormOfMatrix, int *pError) |
void | spDeterminant (MatrixPtr Matrix, int *pExponent, double *pDeterminant) |
double | spLargestElement (MatrixPtr Matrix) |
void | spMNA_Preorder (MatrixPtr Matrix) |
void | spMultiply (MatrixPtr Matrix, double *RHS, double *Solution) |
void | spMultTransposed (MatrixPtr Matrix, double *RHS, double *Solution) |
double | spNorm (MatrixPtr Matrix) |
double | spPseudoCondition (MatrixPtr Matrix) |
double | spRoundoff (MatrixPtr Matrix, double Rho) |
void | spScale (MatrixPtr Matrix, double *RHS_ScaleFactors, double *SolutionScaleFactors) |
void | spStripFills (MatrixPtr Matrix) |
static void | SwapCols (MatrixPtr Matrix, ElementPtr pTwin1, ElementPtr pTwin2) |
#define NORM | ( | a | ) | (nr = ABSS((a).Real), ni = ABSS((a).Imag), MAX (nr,ni)) |
Referenced by spDeterminant().
#define SLACK 1e4 |
Referenced by spCondition().
#define spINSIDE_SPARSE |
Definition at line 64 of file sputils.cpp.
static int CountTwins | ( | MatrixPtr | Matrix, | |
int | Col, | |||
ElementPtr * | ppTwin1, | |||
ElementPtr * | ppTwin2 | |||
) | [static] |
Definition at line 165 of file sputils.cpp.
References ABSS, MatrixFrame::FirstInCol, MatrixElement::NextInCol, MatrixElement::Real, and MatrixElement::Row.
Referenced by spMNA_Preorder().
void spcLinkRows | ( | MatrixPtr | Matrix | ) |
Definition at line 672 of file spbuild.cpp.
References MatrixElement::Col, MatrixFrame::FirstInCol, MatrixFrame::FirstInRow, MatrixElement::NextInCol, MatrixElement::NextInRow, MatrixElement::Row, MatrixFrame::RowsLinked, and MatrixFrame::Size.
Referenced by spMultiply(), spNorm(), spOrderAndFactor(), and spScale().
double spCondition | ( | MatrixPtr | Matrix, | |
double | NormOfMatrix, | |||
int * | pError | |||
) |
Definition at line 1193 of file sputils.cpp.
References ABSS, ALLOC, ASSERT, MatrixElement::Col, MatrixFrame::Complex, MatrixFrame::Diag, MatrixFrame::Error, FREE, if(), MatrixFrame::Intermediate, IS_FACTORED, IS_SPARSE, MAX, MIN, MatrixElement::NextInCol, MatrixElement::NextInRow, MatrixElement::Real, MatrixElement::Row, MatrixFrame::Size, SLACK, spNO_MEMORY, SQR, and Tm.
Referenced by main().
void spDeterminant | ( | MatrixPtr | Matrix, | |
int * | pExponent, | |||
double * | pDeterminant | |||
) |
Definition at line 771 of file sputils.cpp.
References ABSS, ASSERT, CMPLX_MULT_ASSIGN, CMPLX_NEGATE, CMPLX_RECIPROCAL, MatrixFrame::Complex, MatrixFrame::Diag, MatrixFrame::Error, IS_FACTORED, IS_SPARSE, NORM, MatrixFrame::NumberOfInterchangesIsOdd, MatrixElement::Real, MatrixFrame::Size, and Size.
Referenced by main().
double spLargestElement | ( | MatrixPtr | Matrix | ) |
ComplexNumber cPivot;
Definition at line 1701 of file sputils.cpp.
References ABSS, ASSERT, CMPLX_1_NORM, CMPLX_RECIPROCAL, MatrixFrame::Complex, MatrixFrame::Diag, MatrixFrame::Error, MatrixFrame::Factored, MatrixFrame::FirstInCol, MatrixFrame::FirstInRow, IS_SPARSE, MatrixElement::NextInCol, MatrixElement::NextInRow, MatrixElement::Real, and MatrixFrame::Size.
Referenced by main(), and spRoundoff().
void spMNA_Preorder | ( | MatrixPtr | Matrix | ) |
Definition at line 218 of file sputils.cpp.
References ASSERT, BOOLEAN, CountTwins(), MatrixFrame::Diag, MatrixFrame::Factored, IS_VALID, MatrixFrame::Reordered, MatrixFrame::RowsLinked, MatrixFrame::Size, Size, and SwapCols().
Referenced by main().
void spMultiply | ( | MatrixPtr | Matrix, | |
double * | RHS, | |||
double * | Solution | |||
) |
extern void ComplexMatrixMultiply();
Definition at line 513 of file sputils.cpp.
References ASSERT, MatrixElement::Col, MatrixFrame::Complex, MatrixFrame::Factored, MatrixFrame::FirstInRow, MatrixFrame::Intermediate, MatrixFrame::IntToExtColMap, MatrixFrame::IntToExtRowMap, IS_SPARSE, MatrixElement::NextInRow, MatrixElement::Real, MatrixFrame::RowsLinked, MatrixFrame::Size, and spcLinkRows().
Referenced by main().
void spMultTransposed | ( | MatrixPtr | Matrix, | |
double * | RHS, | |||
double * | Solution | |||
) |
Definition at line 592 of file sputils.cpp.
References ASSERT, MatrixFrame::Factored, MatrixFrame::FirstInCol, MatrixFrame::Intermediate, MatrixFrame::IntToExtColMap, MatrixFrame::IntToExtRowMap, IS_SPARSE, MatrixElement::NextInCol, MatrixElement::Real, MatrixElement::Row, and MatrixFrame::Size.
Referenced by main().
double spNorm | ( | MatrixPtr | Matrix | ) |
Definition at line 1604 of file sputils.cpp.
References ABSS, ASSERT, MatrixFrame::Complex, MatrixFrame::FirstInRow, IS_FACTORED, IS_SPARSE, MatrixElement::NextInRow, MatrixElement::Real, MatrixFrame::RowsLinked, MatrixFrame::Size, and spcLinkRows().
Referenced by main().
double spPseudoCondition | ( | MatrixPtr | Matrix | ) |
Definition at line 1114 of file sputils.cpp.
References ASSERT, MatrixFrame::Diag, ELEMENT_MAG, MatrixFrame::Error, IS_FACTORED, IS_SPARSE, and MatrixFrame::Size.
Referenced by main().
double spRoundoff | ( | MatrixPtr | Matrix, | |
double | Rho | |||
) |
Definition at line 1812 of file sputils.cpp.
References ASSERT, MatrixElement::Col, MatrixFrame::FirstInRow, IS_FACTORED, IS_SPARSE, MatrixFrame::MaxRowCountInLowerTri, MatrixElement::NextInRow, MatrixFrame::RelThreshold, MatrixFrame::Size, spLargestElement(), and SQR.
Referenced by main().
void spScale | ( | MatrixPtr | Matrix, | |
double * | RHS_ScaleFactors, | |||
double * | SolutionScaleFactors | |||
) |
Definition at line 322 of file sputils.cpp.
References ASSERT, MatrixFrame::Factored, MatrixFrame::FirstInCol, MatrixFrame::FirstInRow, MatrixFrame::IntToExtColMap, MatrixFrame::IntToExtRowMap, IS_VALID, MatrixElement::NextInCol, MatrixElement::NextInRow, MatrixElement::Real, MatrixFrame::RowsLinked, MatrixFrame::Size, and spcLinkRows().
void spStripFills | ( | MatrixPtr | Matrix | ) |
Definition at line 917 of file sputils.cpp.
References ASSERT, MatrixElement::Col, MatrixFrame::Diag, MatrixFrame::Elements, MatrixFrame::Fillins, MatrixFrame::FillinsRemaining, MatrixFrame::FirstFillinListNode, MatrixFrame::FirstInCol, MatrixFrame::FirstInRow, IS_SPARSE, MatrixFrame::LastFillinListNode, MatrixFrame::NeedsOrdering, FillinListNodeStruct::Next, MatrixFrame::NextAvailFillin, MatrixElement::NextInCol, MatrixElement::NextInRow, FillinListNodeStruct::NumberOfFillinsInList, FillinListNodeStruct::pFillinList, MatrixElement::Row, MatrixFrame::Size, and Size.
static void SwapCols | ( | MatrixPtr | Matrix, | |
ElementPtr | pTwin1, | |||
ElementPtr | pTwin2 | |||
) | [static] |
Definition at line 201 of file sputils.cpp.
References MatrixElement::Col, MatrixFrame::Diag, MatrixFrame::ExtToIntColMap, MatrixFrame::FirstInCol, MatrixFrame::IntToExtColMap, MatrixFrame::NumberOfInterchangesIsOdd, and SWAP.
Referenced by spMNA_Preorder().