Adding clone API in pycsolver ...
authorHamed Gorjiara <hgorjiar@uci.edu>
Fri, 3 Aug 2018 08:32:40 +0000 (01:32 -0700)
committerHamed Gorjiara <hgorjiar@uci.edu>
Fri, 3 Aug 2018 08:32:40 +0000 (01:32 -0700)
.gitignore
src/ccsolver.cc
src/ccsolver.h
src/pycsolver.py

index 480418d..64236e1 100644 (file)
@@ -1,6 +1,6 @@
 #Ignoring netbeans configs
 nbproject/
-sat_solver
+sat_solver*
 setup.sh
 
 #Ignoring binary files
index 25e1761..1c45480 100644 (file)
@@ -144,3 +144,7 @@ void serialize(void* solver){
 void mustHaveValue(void *solver, void *element){
        CCSOLVER(solver)->mustHaveValue( (Element*) element);
 }
+
+void* clone(void * solver){
+       return CCSOLVER(solver)->clone();
+}
\ No newline at end of file
index f98dbf2..a17bd1c 100644 (file)
@@ -41,6 +41,7 @@ int getOrderConstraintValue(void* solver,void *order, long first, long second);
 void printConstraints(void* solver);
 void serialize(void* solver);
 void mustHaveValue(void *solver, void *element);
+void* clone(void * solver);
 #ifdef __cplusplus
 }
 #endif
index ba49d77..b0e43a9 100644 (file)
@@ -109,6 +109,8 @@ def loadCSolver():
        csolverlb.getOrderConstraintValue.restype = c_int
        csolverlb.printConstraints.argtypes = [c_void_p]
        csolverlb.printConstraints.restype = None
+        csolverlb.clone.argtypes = [c_void_p]
+       csolverlb.clone.restype = c_void_p
        csolverlb.serialize.argtypes = [c_void_p]
        csolverlb.serialize.restype = None
        return csolverlb