Commit b5de86cc authored by kilian.sprotte's avatar kilian.sprotte

added most methods of Gecode::Space

according to:
http://www.gecode.org/gecode-doc-latest/classGecode_1_1Space.html

darcs-hash:cbd277a6eb859535fac4486d70e79d9da4428f6c
parent 02df92e4
......@@ -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 @@ SetVar by using GEC-FS-MAKE-*."
(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)
......
......@@ -131,6 +131,14 @@ extern "C" {
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 @@ void GecolSpace_putSet_int_SetVar(GecolSpace* space, int ind, SetVar* set)
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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment