added most methods of Gecode::Space
Tue Jan 9 09:26:57 PST 2007 kilian.sprotte@gmail.com
* added most methods of Gecode::Space
according to:
http://www.gecode.org/gecode-doc-latest/classGecode_1_1Space.html
diff -rN -u old-gecol/ffi.lisp new-gecol/ffi.lisp
--- old-gecol/ffi.lisp 2014-08-27 20:19:05.000000000 -0700
+++ new-gecol/ffi.lisp 2014-08-27 20:19:05.000000000 -0700
@@ -35,6 +35,11 @@
(export ',(if (listp name) (second name) name))
(defcfun ,name ,@args)))
+(defcenum space-status
+ :ss-failed
+ :ss-solved
+ :ss-branch)
+
(defcenum int-rel-type
:irt-= ; =
:irt-/= ; /=
@@ -173,6 +178,33 @@
(ind :int)
(set :pointer))
+(defcfun* ("GecolSpace_status" gecolspace-status) space-status
+ (space :pointer))
+
+(defcfun* ("GecolSpace_description" gecolspace-description) :pointer
+ (space :pointer))
+
+(defcfun* ("GecolSpace_clone" gecolspace-clone) :pointer
+ (space :pointer)
+ (share :boolean))
+
+(defcfun* ("GecolSpace_commit" gecolspace-commit) :void
+ (space :pointer)
+ (d :pointer)
+ (a :unsigned-int))
+
+(defcfun* ("GecolSpace_fail" gecolspace-fail) :void
+ (space :pointer))
+
+(defcfun* ("GecolSpace_failed" gecolspace-failed) :boolean
+ (space :pointer))
+
+(defcfun* ("GecolSpace_propagators" gecolspace-propagators) :unsigned-int
+ (space :pointer))
+
+(defcfun* ("GecolSpace_branchings" gecolspace-branchings) :unsigned-int
+ (space :pointer))
+
;;; DFS
(defcfun ("make_DFS_Space_int_int_Stop" %make-dfs-space-int-int-stop) :pointer
(space :pointer)
diff -rN -u old-gecol/glue.cpp new-gecol/glue.cpp
--- old-gecol/glue.cpp 2014-08-27 20:19:05.000000000 -0700
+++ new-gecol/glue.cpp 2014-08-27 20:19:05.000000000 -0700
@@ -131,6 +131,14 @@
BoolVar* GecolSpace_getBool_int(GecolSpace* space, int ind);
SetVar* GecolSpace_getSet_int(GecolSpace* space, int ind);
void GecolSpace_putSet_int_SetVar(GecolSpace* space, int ind, SetVar* set);
+ SpaceStatus GecolSpace_status(GecolSpace* space);
+ const BranchingDesc* GecolSpace_description(GecolSpace* space);
+ Space* GecolSpace_clone(GecolSpace* space, bool share);
+ void GecolSpace_commit(GecolSpace* space, const BranchingDesc *d, unsigned int a);
+ void GecolSpace_fail(GecolSpace* space);
+ bool GecolSpace_failed(GecolSpace* space);
+ unsigned int GecolSpace_propagators(GecolSpace* space);
+ unsigned int GecolSpace_branchings(GecolSpace* space);
// DFS
DFS<GecolSpace>* make_DFS_Space_int_int_Stop(GecolSpace* space, int c_d, int a_d, Search::Stop* st);
void delete_DFS(DFS<GecolSpace>* dfs);
@@ -391,6 +399,48 @@
sets[ind] = *set;
}
+SpaceStatus GecolSpace_status(GecolSpace* space)
+{
+ return space->Gecode::Space::status();
+}
+
+const BranchingDesc* GecolSpace_description(GecolSpace* space)
+{
+ return space->Gecode::Space::description();
+}
+
+Space* GecolSpace_clone(GecolSpace* space, bool share)
+{
+ return space->Gecode::Space::clone(share);
+}
+
+void GecolSpace_commit(GecolSpace* space, const BranchingDesc *d, unsigned int a)
+{
+ space->Gecode::Space::commit(d, a);
+}
+
+void GecolSpace_fail(GecolSpace* space)
+{
+ space->Gecode::Space::fail();
+}
+
+bool GecolSpace_failed(GecolSpace* space)
+{
+ return space->Gecode::Space::failed();
+}
+
+unsigned int GecolSpace_propagators(GecolSpace* space)
+{
+ return space->Gecode::Space::propagators();
+}
+
+unsigned int GecolSpace_branchings(GecolSpace* space)
+{
+ return space->Gecode::Space::branchings();
+}
+
+
+
// DFS
DFS<GecolSpace>* make_DFS_Space_int_int_Stop(GecolSpace* space, int c_d, int a_d, Search::Stop* st)
{