summaryrefslogtreecommitdiffstats
path: root/src/misc/vec
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2016-04-28 20:54:38 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2016-04-28 20:54:38 -0700
commit59f3389c9bce4c20c6476d46513883f0cf15e454 (patch)
tree35367975452fd3baa7b8bd3a92e662dcc198e494 /src/misc/vec
parent53e86477193186a3b2625f544cc4aad876a832cc (diff)
downloadabc-59f3389c9bce4c20c6476d46513883f0cf15e454.tar.gz
abc-59f3389c9bce4c20c6476d46513883f0cf15e454.tar.bz2
abc-59f3389c9bce4c20c6476d46513883f0cf15e454.zip
Experiments with arithmetic circuits.
Diffstat (limited to 'src/misc/vec')
-rw-r--r--src/misc/vec/vecInt.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h
index 3d7c33fc..e0e2ba7f 100644
--- a/src/misc/vec/vecInt.h
+++ b/src/misc/vec/vecInt.h
@@ -1991,6 +1991,13 @@ static inline void Vec_IntAppendSkip( Vec_Int_t * vVec1, Vec_Int_t * vVec2, int
if ( i != iVar )
Vec_IntPush( vVec1, Entry );
}
+static inline void Vec_IntAppendMinus( Vec_Int_t * vVec1, Vec_Int_t * vVec2, int fMinus )
+{
+ int Entry, i;
+ Vec_IntClear( vVec1 );
+ Vec_IntForEachEntry( vVec2, Entry, i )
+ Vec_IntPush( vVec1, fMinus ? -Entry : Entry );
+}
/**Function*************************************************************