From 2d90b916e6e46513786b7a0e38e8c0b7b938c623 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 1 Mar 2015 19:11:15 -0800 Subject: Improvements to the CBA package. --- src/misc/vec/vecStr.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/misc/vec') diff --git a/src/misc/vec/vecStr.h b/src/misc/vec/vecStr.h index 3dd6cfac..d183ae24 100644 --- a/src/misc/vec/vecStr.h +++ b/src/misc/vec/vecStr.h @@ -744,6 +744,39 @@ static inline int Vec_StrCountSmaller( Vec_Str_t * p, char Entry ) return Counter; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int Vec_StrCountEntryLit( Vec_Str_t * p, char Entry ) +{ + int i, Counter = 0; + for ( i = 0; i < p->nSize; i++ ) + Counter += (Abc_Lit2Var((int)p->pArray[i]) == Entry); + return Counter; +} +static inline int Vec_StrCountLargerLit( Vec_Str_t * p, char Entry ) +{ + int i, Counter = 0; + for ( i = 0; i < p->nSize; i++ ) + Counter += (Abc_Lit2Var((int)p->pArray[i]) > Entry); + return Counter; +} +static inline int Vec_StrCountSmallerLit( Vec_Str_t * p, char Entry ) +{ + int i, Counter = 0; + for ( i = 0; i < p->nSize; i++ ) + Counter += (Abc_Lit2Var((int)p->pArray[i]) < Entry); + return Counter; +} + /**Function************************************************************* Synopsis [Compares two strings.] -- cgit v1.2.3