30static int Msat_IntVecSortCompare1(
int * pp1,
int * pp2 );
31static int Msat_IntVecSortCompare2(
int * pp1,
int * pp2 );
52 if ( nCap > 0 && nCap < 16 )
99 memcpy(
p->pArray, pArray,
sizeof(
int) * nSize );
119 p->nCap = pVec->
nCap;
141 p->nCap = pVec->
nCap;
182 for ( i = 0; i <
p->nSize; i++ )
183 p->pArray[i] = Entry;
199 int * pArray =
p->pArray;
251 assert( i >= 0 && i < p->nSize );
268 assert( i >= 0 && i < p->nSize );
269 p->pArray[i] = Entry;
285 return p->pArray[
p->nSize-1];
301 if (
p->nCap >= nCapMin )
320 assert(
p->nSize >= nSizeNew );
353 if (
p->nSize ==
p->nCap )
360 p->pArray[
p->nSize++] = Entry;
377 for ( i = 0; i <
p->nSize; i++ )
378 if (
p->pArray[i] == Entry )
401 for ( i =
p->nSize-1; i > 0; i-- )
403 Entry1 =
p->pArray[i ];
404 Entry2 =
p->pArray[i-1];
405 if (( fIncrease && Entry1 >= Entry2) ||
406 (!fIncrease && Entry1 <= Entry2) )
408 p->pArray[i ] = Entry2;
409 p->pArray[i-1] = Entry1;
428 return p->pArray[--
p->nSize];
445 qsort( (
void *)
p->pArray, (
size_t)
p->nSize,
sizeof(
int),
446 (int (*)(
const void *,
const void *)) Msat_IntVecSortCompare2 );
448 qsort( (
void *)
p->pArray, (
size_t)
p->nSize,
sizeof(
int),
449 (int (*)(
const void *,
const void *)) Msat_IntVecSortCompare1 );
463int Msat_IntVecSortCompare1(
int * pp1,
int * pp2 )
484int Msat_IntVecSortCompare2(
int * pp1,
int * pp2 )
#define ABC_ALLOC(type, num)
#define ABC_REALLOC(type, obj, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Msat_IntVecGrow(Msat_IntVec_t *p, int nCapMin)
Msat_IntVec_t * Msat_IntVecAllocArray(int *pArray, int nSize)
int Msat_IntVecPop(Msat_IntVec_t *p)
Msat_IntVec_t * Msat_IntVecAllocArrayCopy(int *pArray, int nSize)
int Msat_IntVecPushUnique(Msat_IntVec_t *p, int Entry)
void Msat_IntVecPushUniqueOrder(Msat_IntVec_t *p, int Entry, int fIncrease)
int Msat_IntVecReadEntryLast(Msat_IntVec_t *p)
int Msat_IntVecReadEntry(Msat_IntVec_t *p, int i)
void Msat_IntVecSort(Msat_IntVec_t *p, int fReverse)
Msat_IntVec_t * Msat_IntVecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Msat_IntVec_t * Msat_IntVecDup(Msat_IntVec_t *pVec)
Msat_IntVec_t * Msat_IntVecDupArray(Msat_IntVec_t *pVec)
int * Msat_IntVecReleaseArray(Msat_IntVec_t *p)
void Msat_IntVecFill(Msat_IntVec_t *p, int nSize, int Entry)
void Msat_IntVecShrink(Msat_IntVec_t *p, int nSizeNew)
void Msat_IntVecFree(Msat_IntVec_t *p)
void Msat_IntVecWriteEntry(Msat_IntVec_t *p, int i, int Entry)
int Msat_IntVecReadSize(Msat_IntVec_t *p)
void Msat_IntVecClear(Msat_IntVec_t *p)
void Msat_IntVecPush(Msat_IntVec_t *p, int Entry)
int * Msat_IntVecReadArray(Msat_IntVec_t *p)
struct Msat_IntVec_t_ Msat_IntVec_t