Browse Source

sparse/*.c, whitespace

pre-master-46
rlar 13 years ago
parent
commit
93052df7d0
  1. 5
      src/maths/sparse/spalloc.c
  2. 4
      src/maths/sparse/spbuild.c
  3. 3
      src/maths/sparse/spfactor.c
  4. 4
      src/maths/sparse/spoutput.c
  5. 5
      src/maths/sparse/spsmp.c
  6. 2
      src/maths/sparse/spsolve.c
  7. 16
      src/maths/sparse/sputils.c

5
src/maths/sparse/spalloc.c

@ -648,7 +648,6 @@ AllocateBlockOfAllocationList(MatrixPtr Matrix)
void void
spDestroy(MatrixPtr Matrix) spDestroy(MatrixPtr Matrix)
{ {
AllocationListPtr ListPtr, NextListPtr; AllocationListPtr ListPtr, NextListPtr;
@ -743,8 +742,6 @@ spError(MatrixPtr Matrix )
void void
spWhereSingular(MatrixPtr Matrix, int *pRow, int *pCol) spWhereSingular(MatrixPtr Matrix, int *pRow, int *pCol)
{ {
/* Begin `spWhereSingular'. */ /* Begin `spWhereSingular'. */
assert( IS_SPARSE( Matrix ) ); assert( IS_SPARSE( Matrix ) );
@ -781,8 +778,6 @@ spWhereSingular(MatrixPtr Matrix, int *pRow, int *pCol)
int int
spGetSize(MatrixPtr Matrix, int External) spGetSize(MatrixPtr Matrix, int External)
{ {
/* Begin `spGetSize'. */ /* Begin `spGetSize'. */
assert( IS_SPARSE( Matrix ) ); assert( IS_SPARSE( Matrix ) );

4
src/maths/sparse/spbuild.c

@ -96,7 +96,6 @@ static void ExpandTranslationArrays( MatrixPtr, int );
void void
spClear(MatrixPtr Matrix) spClear(MatrixPtr Matrix)
{ {
ElementPtr pElement; ElementPtr pElement;
int I; int I;
@ -183,7 +182,6 @@ spClear(MatrixPtr Matrix)
RealNumber * RealNumber *
spFindElement(MatrixPtr Matrix, int Row, int Col) spFindElement(MatrixPtr Matrix, int Row, int Col)
{ {
ElementPtr pElement; ElementPtr pElement;
/* Begin `spFindElement'. */ /* Begin `spFindElement'. */
@ -266,7 +264,6 @@ ElementPtr pElement;
RealNumber * RealNumber *
spGetElement(MatrixPtr Matrix, int Row, int Col) spGetElement(MatrixPtr Matrix, int Row, int Col)
{ {
ElementPtr pElement; ElementPtr pElement;
/* Begin `spGetElement'. */ /* Begin `spGetElement'. */
@ -1148,7 +1145,6 @@ spGetInitInfo(RealNumber *pElement)
int int
spInitialize(MatrixPtr Matrix, int (*pInit)(RealNumber*, void *InitInfo, int , int Col)) spInitialize(MatrixPtr Matrix, int (*pInit)(RealNumber*, void *InitInfo, int , int Col))
{ {
ElementPtr pElement; ElementPtr pElement;
int J, Error, Col; int J, Error, Col;

3
src/maths/sparse/spfactor.c

@ -192,7 +192,6 @@ int
spOrderAndFactor(MatrixPtr Matrix, RealNumber RHS[], RealNumber RelThreshold, spOrderAndFactor(MatrixPtr Matrix, RealNumber RHS[], RealNumber RelThreshold,
RealNumber AbsThreshold, int DiagPivoting) RealNumber AbsThreshold, int DiagPivoting)
{ {
ElementPtr pPivot; ElementPtr pPivot;
int Step, Size, ReorderingRequired; int Step, Size, ReorderingRequired;
RealNumber LargestInCol; RealNumber LargestInCol;
@ -323,7 +322,6 @@ Done:
int int
spFactor(MatrixPtr Matrix) spFactor(MatrixPtr Matrix)
{ {
ElementPtr pElement; ElementPtr pElement;
ElementPtr pColumn; ElementPtr pColumn;
int Step, Size; int Step, Size;
@ -571,7 +569,6 @@ FactorComplexMatrix( MatrixPtr Matrix )
void void
spPartition(MatrixPtr Matrix, int Mode) spPartition(MatrixPtr Matrix, int Mode)
{ {
ElementPtr pElement, pColumn; ElementPtr pElement, pColumn;
int Step, Size; int Step, Size;
int *Nc, *No, *Nm; int *Nc, *No, *Nm;

4
src/maths/sparse/spoutput.c

@ -137,7 +137,6 @@ int Printer_Width = PRINTER_WIDTH;
void void
spPrint(MatrixPtr Matrix, int PrintReordered, int Data, int Header) spPrint(MatrixPtr Matrix, int PrintReordered, int Data, int Header)
{ {
int J = 0; int J = 0;
int I, Row, Col, Size, Top; int I, Row, Col, Size, Top;
int StartCol = 1, StopCol, Columns, ElementCount = 0; int StartCol = 1, StopCol, Columns, ElementCount = 0;
@ -441,7 +440,6 @@ int
spFileMatrix(MatrixPtr Matrix, char *File, char *Label, int Reordered, spFileMatrix(MatrixPtr Matrix, char *File, char *Label, int Reordered,
int Data, int Header) int Data, int Header)
{ {
int I, Size; int I, Size;
ElementPtr pElement; ElementPtr pElement;
int Row, Col, Err; int Row, Col, Err;
@ -599,7 +597,6 @@ spFileMatrix(MatrixPtr Matrix, char *File, char *Label, int Reordered,
int int
spFileVector(MatrixPtr Matrix, char *File, RealVector RHS, RealVector iRHS) spFileVector(MatrixPtr Matrix, char *File, RealVector RHS, RealVector iRHS)
{ {
int I, Size, Err; int I, Size, Err;
FILE *pMatrixFile; FILE *pMatrixFile;
@ -690,7 +687,6 @@ spFileVector(MatrixPtr Matrix, char *File, RealVector RHS, RealVector iRHS)
int int
spFileStats(MatrixPtr Matrix, char *File, char *Label) spFileStats(MatrixPtr Matrix, char *File, char *Label)
{ {
int Size, I; int Size, I;
ElementPtr pElement; ElementPtr pElement;
int NumberOfElements; int NumberOfElements;

5
src/maths/sparse/spsmp.c

@ -422,7 +422,6 @@ SMPcDProd(SMPmatrix *Matrix, SPcomplex *pMantissa, int *pExponent)
static void static void
LoadGmin(SMPmatrix *Matrix, double Gmin) LoadGmin(SMPmatrix *Matrix, double Gmin)
{ {
int I; int I;
ArrayOfElementPtrs Diag; ArrayOfElementPtrs Diag;
ElementPtr diag; ElementPtr diag;
@ -455,7 +454,6 @@ LoadGmin(SMPmatrix *Matrix, double Gmin)
SMPelement * SMPelement *
SMPfindElt(SMPmatrix *Matrix, int Row, int Col, int CreateIfMissing) SMPfindElt(SMPmatrix *Matrix, int Row, int Col, int CreateIfMissing)
{ {
ElementPtr Element; ElementPtr Element;
/* Begin `SMPfindElt'. */ /* Begin `SMPfindElt'. */
@ -475,7 +473,6 @@ SMPfindElt(SMPmatrix *Matrix, int Row, int Col, int CreateIfMissing)
int int
SMPcZeroCol(SMPmatrix *Matrix, int Col) SMPcZeroCol(SMPmatrix *Matrix, int Col)
{ {
ElementPtr Element; ElementPtr Element;
Col = Matrix->ExtToIntColMap[Col]; Col = Matrix->ExtToIntColMap[Col];
@ -497,7 +494,6 @@ SMPcZeroCol(SMPmatrix *Matrix, int Col)
int int
SMPcAddCol(SMPmatrix *Matrix, int Accum_Col, int Addend_Col) SMPcAddCol(SMPmatrix *Matrix, int Accum_Col, int Addend_Col)
{ {
ElementPtr Accum, Addend, *Prev; ElementPtr Accum, Addend, *Prev;
Accum_Col = Matrix->ExtToIntColMap[Accum_Col]; Accum_Col = Matrix->ExtToIntColMap[Accum_Col];
@ -529,7 +525,6 @@ SMPcAddCol(SMPmatrix *Matrix, int Accum_Col, int Addend_Col)
int int
SMPzeroRow(SMPmatrix *Matrix, int Row) SMPzeroRow(SMPmatrix *Matrix, int Row)
{ {
ElementPtr Element; ElementPtr Element;
Row = Matrix->ExtToIntColMap[Row]; Row = Matrix->ExtToIntColMap[Row];

2
src/maths/sparse/spsolve.c

@ -127,7 +127,6 @@ void
spSolve(MatrixPtr Matrix, RealVector RHS, RealVector Solution, spSolve(MatrixPtr Matrix, RealVector RHS, RealVector Solution,
RealVector iRHS, RealVector iSolution) RealVector iRHS, RealVector iSolution)
{ {
ElementPtr pElement; ElementPtr pElement;
RealVector Intermediate; RealVector Intermediate;
RealNumber Temp; RealNumber Temp;
@ -403,7 +402,6 @@ void
spSolveTransposed(MatrixPtr Matrix, RealVector RHS, RealVector Solution, spSolveTransposed(MatrixPtr Matrix, RealVector RHS, RealVector Solution,
RealVector iRHS, RealVector iSolution) RealVector iRHS, RealVector iSolution)
{ {
ElementPtr pElement; ElementPtr pElement;
RealVector Intermediate; RealVector Intermediate;
int I, *pExtOrder, Size; int I, *pExtOrder, Size;

16
src/maths/sparse/sputils.c

@ -176,7 +176,6 @@ static void ComplexTransposedMatrixMultiply( MatrixPtr, RealVector, RealVector,
void void
spMNA_Preorder(MatrixPtr Matrix) spMNA_Preorder(MatrixPtr Matrix)
{ {
int J, Size; int J, Size;
ElementPtr pTwin1, pTwin2; ElementPtr pTwin1, pTwin2;
int Twins, StartAt = 1; int Twins, StartAt = 1;
@ -370,7 +369,6 @@ SwapCols( MatrixPtr Matrix, ElementPtr pTwin1, ElementPtr pTwin2 )
void void
spScale(MatrixPtr Matrix, RealVector RHS_ScaleFactors, RealVector SolutionScaleFactors) spScale(MatrixPtr Matrix, RealVector RHS_ScaleFactors, RealVector SolutionScaleFactors)
{ {
ElementPtr pElement; ElementPtr pElement;
int I, lSize, *pExtOrder; int I, lSize, *pExtOrder;
RealNumber ScaleFactor; RealNumber ScaleFactor;
@ -579,7 +577,6 @@ spMultiply(MatrixPtr Matrix, RealVector RHS, RealVector Solution,
RealNumber Sum; RealNumber Sum;
int I, *pExtOrder; int I, *pExtOrder;
/* Begin `spMultiply'. */ /* Begin `spMultiply'. */
assert( IS_SPARSE( Matrix ) && !Matrix->Factored ); assert( IS_SPARSE( Matrix ) && !Matrix->Factored );
if (!Matrix->RowsLinked) if (!Matrix->RowsLinked)
@ -725,7 +722,6 @@ spMultTransposed(MatrixPtr Matrix, RealVector RHS, RealVector Solution,
RealNumber Sum; RealNumber Sum;
int I, *pExtOrder; int I, *pExtOrder;
/* Begin `spMultTransposed'. */ /* Begin `spMultTransposed'. */
assert( IS_SPARSE( Matrix ) && !Matrix->Factored ); assert( IS_SPARSE( Matrix ) && !Matrix->Factored );
if (!Matrix->InternalVectorsAllocated) if (!Matrix->InternalVectorsAllocated)
@ -881,7 +877,6 @@ void
spDeterminant(MatrixPtr Matrix, int *pExponent, RealNumber *pDeterminant, spDeterminant(MatrixPtr Matrix, int *pExponent, RealNumber *pDeterminant,
RealNumber *piDeterminant) RealNumber *piDeterminant)
{ {
int I, Size; int I, Size;
RealNumber Norm, nr, ni; RealNumber Norm, nr, ni;
ComplexNumber Pivot, cDeterminant; ComplexNumber Pivot, cDeterminant;
@ -1039,7 +1034,6 @@ spDeterminant(MatrixPtr Matrix, int *pExponent, RealNumber *pDeterminant,
void void
spStripFills(MatrixPtr Matrix) spStripFills(MatrixPtr Matrix)
{ {
struct FillinListNodeStruct *pListNode; struct FillinListNodeStruct *pListNode;
/* Begin `spStripFills'. */ /* Begin `spStripFills'. */
@ -1111,8 +1105,6 @@ spStripFills(MatrixPtr Matrix)
void void
spStripMatrix(MatrixPtr Matrix) spStripMatrix(MatrixPtr Matrix)
{ {
/* Begin `spStripMatrix'. */ /* Begin `spStripMatrix'. */
assert( IS_SPARSE( Matrix ) ); assert( IS_SPARSE( Matrix ) );
if (Matrix->Elements == 0) return; if (Matrix->Elements == 0) return;
@ -1124,7 +1116,6 @@ spStripMatrix(MatrixPtr Matrix)
/* Reset the element lists. */ /* Reset the element lists. */
{ {
struct ElementListNodeStruct *pListNode; struct ElementListNodeStruct *pListNode;
pListNode = Matrix->LastElementListNode = Matrix->FirstElementListNode; pListNode = Matrix->LastElementListNode = Matrix->FirstElementListNode;
@ -1134,7 +1125,6 @@ spStripMatrix(MatrixPtr Matrix)
/* Reset the fill-in lists. */ /* Reset the fill-in lists. */
{ {
struct FillinListNodeStruct *pListNode; struct FillinListNodeStruct *pListNode;
pListNode = Matrix->LastFillinListNode = Matrix->FirstFillinListNode; pListNode = Matrix->LastFillinListNode = Matrix->FirstFillinListNode;
@ -1199,7 +1189,6 @@ spStripMatrix(MatrixPtr Matrix)
void void
spDeleteRowAndCol(MatrixPtr Matrix, int Row, int Col) spDeleteRowAndCol(MatrixPtr Matrix, int Row, int Col)
{ {
ElementPtr pElement, *ppElement, pLastElement; ElementPtr pElement, *ppElement, pLastElement;
int Size, ExtRow, ExtCol; int Size, ExtRow, ExtCol;
ElementPtr spcFindElementInCol(); ElementPtr spcFindElementInCol();
@ -1312,7 +1301,6 @@ spDeleteRowAndCol(MatrixPtr Matrix, int Row, int Col)
RealNumber RealNumber
spPseudoCondition(MatrixPtr Matrix) spPseudoCondition(MatrixPtr Matrix)
{ {
int I; int I;
ArrayOfElementPtrs Diag; ArrayOfElementPtrs Diag;
RealNumber MaxPivot, MinPivot, Mag; RealNumber MaxPivot, MinPivot, Mag;
@ -1403,7 +1391,6 @@ spPseudoCondition(MatrixPtr Matrix)
RealNumber RealNumber
spCondition(MatrixPtr Matrix, RealNumber NormOfMatrix, int *pError) spCondition(MatrixPtr Matrix, RealNumber NormOfMatrix, int *pError)
{ {
ElementPtr pElement; ElementPtr pElement;
RealVector T, Tm; RealVector T, Tm;
int I, K, Row; int I, K, Row;
@ -1831,7 +1818,6 @@ int *pError;
RealNumber RealNumber
spNorm(MatrixPtr Matrix) spNorm(MatrixPtr Matrix)
{ {
ElementPtr pElement; ElementPtr pElement;
int I; int I;
RealNumber Max = 0.0, AbsRowSum; RealNumber Max = 0.0, AbsRowSum;
@ -1949,7 +1935,6 @@ spNorm(MatrixPtr Matrix)
RealNumber RealNumber
spLargestElement(MatrixPtr Matrix) spLargestElement(MatrixPtr Matrix)
{ {
int I; int I;
RealNumber Mag, AbsColSum, Max = 0.0, MaxRow = 0.0, MaxCol = 0.0; RealNumber Mag, AbsColSum, Max = 0.0, MaxRow = 0.0, MaxCol = 0.0;
RealNumber Pivot; RealNumber Pivot;
@ -2078,7 +2063,6 @@ spLargestElement(MatrixPtr Matrix)
RealNumber RealNumber
spRoundoff(MatrixPtr Matrix, RealNumber Rho) spRoundoff(MatrixPtr Matrix, RealNumber Rho)
{ {
ElementPtr pElement; ElementPtr pElement;
int Count, I, MaxCount = 0; int Count, I, MaxCount = 0;
RealNumber Reid, Gear; RealNumber Reid, Gear;

Loading…
Cancel
Save