2 #include <../../nrnconf.h>
54 "Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert";
73 #define spINSIDE_SPARSE
124 register unsigned SizePlusOne;
154 AllocatedSize =
MAX(
Size, MINIMUM_ALLOCATED_SIZE );
155 SizePlusOne = (unsigned)(AllocatedSize + 1);
241 for (
I = 1;
I <= AllocatedSize;
I++)
256 for (
I = 1;
I <= AllocatedSize;
I++)
266 SPACE_FOR_FILL_INS*AllocatedSize );
375 NumberOfFillinsExpected )
378 int InitialNumberOfElements, NumberOfFillinsExpected;
449 #if NOT STRIP OR LINT
527 if (AllocatedPtr ==
NULL)
536 {
FREE(AllocatedPtr);
594 ListPtr += ELEMENTS_PER_ALLOCATION;
595 for (
I = ELEMENTS_PER_ALLOCATION;
I > 0;
I--)
637 register char *eMatrix;
664 while (ListPtr !=
NULL)
667 ListPtr = NextListPtr;
744 else *pRow = *pCol = 0;
int spGetSize(char *eMatrix, BOOLEAN External)
static void AllocateBlockOfAllocationList()
void spWhereSingular(char *eMatrix, int *pRow, int *pCol)
ElementPtr spcGetFillin(MatrixPtr Matrix)
ElementPtr spcGetElement(MatrixPtr Matrix)
void spSetComplex(char *eMatrix)
char * spCreate(int Size, BOOLEAN Complex, int *pError)
void spDestroy(char *eMatrix)
static void RecordAllocation()
void spSetReal(char *eMatrix)
int spElementCount(char *eMatrix)
static void InitializeElementBlocks()
int spFillinCount(char *eMatrix)
int spError(char *eMatrix)
#define ALLOC(type, number)
struct MatrixFrame * MatrixPtr
#define CALLOC(ptr, type, number)
#define ASSERT(condition)
#define IS_SPARSE(matrix)
register ElementPtr pElement
struct AllocationRecord * NextRecord
int NumberOfFillinsInList
struct FillinListNodeStruct * Next
struct MatrixElement * NextInCol
struct MatrixElement * NextInRow
ElementPtr NextAvailFillin
BOOLEAN InternalVectorsAllocated
BOOLEAN PreviousMatrixWasComplex
struct FillinListNodeStruct * FirstFillinListNode
BOOLEAN NumberOfInterchangesIsOdd
struct FillinListNodeStruct * LastFillinListNode
ArrayOfElementPtrs FirstInCol
ArrayOfElementPtrs FirstInRow
AllocationListPtr TopOfAllocationList
ElementPtr NextAvailElement
struct MatrixElement TrashCan