diff options
Diffstat (limited to 'src/misc/vec/vecInt.h')
-rw-r--r-- | src/misc/vec/vecInt.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index c3c92f09..966f5ac9 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -313,6 +313,23 @@ static inline int Vec_IntEntry( Vec_Int_t * p, int i ) SeeAlso [] ***********************************************************************/ +static inline int * Vec_IntEntryP( Vec_Int_t * p, int i ) +{ + assert( i >= 0 && i < p->nSize ); + return p->pArray + i; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ static inline void Vec_IntWriteEntry( Vec_Int_t * p, int i, int Entry ) { assert( i >= 0 && i < p->nSize ); @@ -764,6 +781,27 @@ static inline void Vec_IntReverseOrder( Vec_Int_t * p ) /**Function************************************************************* + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline Vec_Int_t * Vec_IntInvert( Vec_Int_t * p ) +{ + Vec_Int_t * vRes; + int Entry, i; + vRes = Vec_IntStart( Vec_IntFindMax(p) + 1 ); + Vec_IntForEachEntry( p, Entry, i ) + Vec_IntWriteEntry( vRes, Entry, i ); + return vRes; +} + +/**Function************************************************************* + Synopsis [Comparison procedure for two integers.] Description [] |