summaryrefslogtreecommitdiffstats
path: root/src/base/abc/abcSop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abc/abcSop.c')
-rw-r--r--src/base/abc/abcSop.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/base/abc/abcSop.c b/src/base/abc/abcSop.c
index 9e751f0a..e562a32a 100644
--- a/src/base/abc/abcSop.c
+++ b/src/base/abc/abcSop.c
@@ -628,6 +628,31 @@ void Abc_SopComplement( char * pSop )
SeeAlso []
***********************************************************************/
+void Abc_SopComplementVar( char * pSop, int iVar )
+{
+ char * pCube;
+ int nVars = Abc_SopGetVarNum(pSop);
+ assert( iVar < nVars );
+ Abc_SopForEachCube( pSop, nVars, pCube )
+ {
+ if ( pCube[iVar] == '0' )
+ pCube[iVar] = '1';
+ else if ( pCube[iVar] == '1' )
+ pCube[iVar] = '0';
+ }
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
int Abc_SopIsComplement( char * pSop )
{
char * pCur;