summaryrefslogtreecommitdiffstats
path: root/src/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/vec/vecInt.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h
index c821d121..2cba9f14 100644
--- a/src/misc/vec/vecInt.h
+++ b/src/misc/vec/vecInt.h
@@ -1054,6 +1054,27 @@ static inline Vec_Int_t * Vec_IntInvert( Vec_Int_t * p, int Fill )
SeeAlso []
***********************************************************************/
+static inline Vec_Int_t * Vec_IntCondense( Vec_Int_t * p, int Fill )
+{
+ int Entry, i;
+ Vec_Int_t * vRes = Vec_IntAlloc( Vec_IntSize(p) );
+ Vec_IntForEachEntry( p, Entry, i )
+ if ( Entry != Fill )
+ Vec_IntPush( vRes, Entry );
+ return vRes;
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
static inline int Vec_IntSum( Vec_Int_t * p )
{
int i, Counter = 0;