diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-03-01 19:11:15 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-03-01 19:11:15 -0800 |
commit | 2d90b916e6e46513786b7a0e38e8c0b7b938c623 (patch) | |
tree | ed0e3babe09b871779e0d4418dc1cef7541e2299 /src/misc/vec | |
parent | f27979fc8fd5663d2bc9d9bad3fcbed2acfc4e17 (diff) | |
download | abc-2d90b916e6e46513786b7a0e38e8c0b7b938c623.tar.gz abc-2d90b916e6e46513786b7a0e38e8c0b7b938c623.tar.bz2 abc-2d90b916e6e46513786b7a0e38e8c0b7b938c623.zip |
Improvements to the CBA package.
Diffstat (limited to 'src/misc/vec')
-rw-r--r-- | src/misc/vec/vecStr.h | 33 |
1 files changed, 33 insertions, 0 deletions
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 @@ -746,6 +746,39 @@ static inline int Vec_StrCountSmaller( Vec_Str_t * p, char Entry ) /**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.] Description [] |