#include <stdio.h>
#include "spmatrix.h"
#include <stdlib.h>
Go to the source code of this file.
|
#define | LINT NO |
|
#define | BOOLEAN int |
|
#define | NO 0 |
|
#define | YES 1 |
|
#define | NOT ! |
|
#define | AND && |
|
#define | OR || |
|
#define | NULL 0 |
|
#define | SPARSE_ID 0x772773 /* Arbitrary (is Sparse on phone). */ |
|
#define | IS_SPARSE(matrix) ((matrix) != NULL && (matrix)->ID == SPARSE_ID) |
|
#define | IS_VALID(matrix) ((matrix) != NULL && (matrix)->ID == SPARSE_ID && (matrix)->Error >= spOKAY && (matrix)->Error < spFATAL) |
|
#define | IS_FACTORED(matrix) ((matrix)->Factored && !(matrix)->NeedsOrdering) |
|
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
|
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
|
#define | ABS(a) ((a) < 0.0 ? -(a) : (a)) |
|
#define | SQR(a) ((a) * (a)) |
|
#define | SWAP(type, a, b) |
|
#define | ELEMENT_MAG(ptr) ((ptr)->Real < 0.0 ? -(ptr)->Real : (ptr)->Real) |
|
#define | ASSERT(condition) |
|
#define | ABORT() |
|
#define | ALLOC(type, number) ((type*)malloc((unsigned)(sizeof(type) * (number)))) |
|
#define | REALLOC(ptr, type, number) ptr = (type*)realloc((char*)ptr, (unsigned)(sizeof(type) * (number))) |
|
#define | FREE(ptr) |
|
#define | CALLOC(ptr, type, number) |
|
◆ ABORT
◆ ABS
#define ABS |
( |
|
a | ) |
((a) < 0.0 ? -(a) : (a)) |
◆ ALLOC
#define ALLOC |
( |
|
type, |
|
|
|
number |
|
) |
| ((type*)malloc((unsigned)(sizeof(type) * (number)))) |
◆ AND
◆ ASSERT
#define ASSERT |
( |
|
condition | ) |
|
◆ BOOLEAN
◆ CALLOC
#define CALLOC |
( |
|
ptr, |
|
|
|
type, |
|
|
|
number |
|
) |
| |
Value: { \
for (
i = (number)-1;
i >= 0;
i--) \
}
#define ALLOC(type, number)
Definition at line 187 of file spdefs.h.
◆ ELEMENT_MAG
#define ELEMENT_MAG |
( |
|
ptr | ) |
((ptr)->Real < 0.0 ? -(ptr)->Real : (ptr)->Real) |
◆ FREE
Value: { \
char*
p = (
char*)(ptr); \
} \
}
Definition at line 177 of file spdefs.h.
◆ IS_FACTORED
#define IS_FACTORED |
( |
|
matrix | ) |
((matrix)->Factored && !(matrix)->NeedsOrdering) |
◆ IS_SPARSE
#define IS_SPARSE |
( |
|
matrix | ) |
((matrix) != NULL && (matrix)->ID == SPARSE_ID) |
◆ IS_VALID
#define IS_VALID |
( |
|
matrix | ) |
((matrix) != NULL && (matrix)->ID == SPARSE_ID && (matrix)->Error >= spOKAY && (matrix)->Error < spFATAL) |
◆ LINT
◆ MAX
#define MAX |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) > (b) ? (a) : (b)) |
◆ MIN
#define MIN |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < (b) ? (a) : (b)) |
◆ NO
◆ NOT
◆ NULL
◆ OR
◆ REALLOC
#define REALLOC |
( |
|
ptr, |
|
|
|
type, |
|
|
|
number |
|
) |
| ptr = (type*)realloc((char*)ptr, (unsigned)(sizeof(type) * (number))) |
◆ SPARSE_ID
#define SPARSE_ID 0x772773 /* Arbitrary (is Sparse on phone). */ |
◆ SQR
#define SQR |
( |
|
a | ) |
((a) * (a)) |
◆ SWAP
#define SWAP |
( |
|
type, |
|
|
|
a, |
|
|
|
b |
|
) |
| |
Value: { \
type swapx; \
swapx = a; \
a = b; \
b = swapx; \
}
Definition at line 125 of file spdefs.h.
◆ YES
◆ AllocationListPtr
◆ ArrayOfElementPtrs
◆ ElementPtr
◆ MatrixPtr
◆ RealNumber
◆ RealVector