From 3db1557f45b03875a0a0b8adddcc15c4565895d2 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 11 Jun 2006 08:01:00 -0700 Subject: Version abc60611 --- src/misc/vec/vecInt.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/misc/vec/vecInt.h') diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index 5a627623..fd8dbc86 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -538,6 +538,27 @@ static inline void Vec_IntPushOrder( Vec_Int_t * p, int Entry ) p->pArray[i+1] = Entry; } +/**Function************************************************************* + + Synopsis [Inserts the entry while preserving the increasing order.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int Vec_IntPushUniqueOrder( Vec_Int_t * p, int Entry ) +{ + int i; + for ( i = 0; i < p->nSize; i++ ) + if ( p->pArray[i] == Entry ) + return 1; + Vec_IntPushOrder( p, Entry ); + return 0; +} + /**Function************************************************************* Synopsis [] -- cgit v1.2.3