From 2c96c8af36446d3b855e07d78975cfad50c2917c Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 21 Jul 2008 08:01:00 -0700 Subject: Version abc80721 --- src/misc/vec/vecInt.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'src/misc/vec') diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index 430b7b63..f20c7cc8 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -656,6 +656,52 @@ static inline int Vec_IntRemove( Vec_Int_t * p, int Entry ) return 1; } +/**Function************************************************************* + + Synopsis [Find entry.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int Vec_IntFindMax( Vec_Int_t * p ) +{ + int i, Best; + if ( p->nSize == 0 ) + return 0; + Best = p->pArray[0]; + for ( i = 1; i < p->nSize; i++ ) + if ( Best < p->pArray[i] ) + Best = p->pArray[i]; + return Best; +} + +/**Function************************************************************* + + Synopsis [Find entry.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int Vec_IntFindMin( Vec_Int_t * p ) +{ + int i, Best; + if ( p->nSize == 0 ) + return 0; + Best = p->pArray[0]; + for ( i = 1; i < p->nSize; i++ ) + if ( Best > p->pArray[i] ) + Best = p->pArray[i]; + return Best; +} + /**Function************************************************************* Synopsis [Comparison procedure for two integers.] -- cgit v1.2.3