From 51a646a355c78cf0f4cf104d6316706653b24008 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 22 Jun 2015 23:05:13 -0700 Subject: Version abc90901 committer: Baruch Sterin --- src/misc/vec/vecInt.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'src/misc/vec/vecInt.h') 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 @@ -302,6 +302,23 @@ static inline int Vec_IntEntry( Vec_Int_t * p, int i ) return p->pArray[i]; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int * Vec_IntEntryP( Vec_Int_t * p, int i ) +{ + assert( i >= 0 && i < p->nSize ); + return p->pArray + i; +} + /**Function************************************************************* Synopsis [] @@ -762,6 +779,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.] -- cgit v1.2.3