-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from tawhai/generalised_tree_growing
Generalised tree growing
- Loading branch information
Showing
14 changed files
with
747 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,31 @@ | ||
|
||
%module(package="aether") growtree | ||
%include symbol_export.h | ||
%include growtree.h | ||
%include symbol_export.h | ||
|
||
%typemap(in) (int elemlist_len, int elemlist[]) { | ||
int i; | ||
if (!PyList_Check($input)) { | ||
PyErr_SetString(PyExc_ValueError, "Expecting a list"); | ||
SWIG_fail; | ||
} | ||
$1 = PyList_Size($input); | ||
$2 = (int *) malloc(($1)*sizeof(int)); | ||
for (i = 0; i < $1; i++) { | ||
PyObject *o = PyList_GetItem($input, i); | ||
if (!PyInt_Check(o)) { | ||
free($2); | ||
PyErr_SetString(PyExc_ValueError, "List items must be integers"); | ||
SWIG_fail; | ||
} | ||
$2[i] = PyInt_AsLong(o); | ||
} | ||
} | ||
|
||
%typemap(freearg) (int elemlist_len, int elemlist[]) { | ||
if ($2) free($2); | ||
} | ||
|
||
%{ | ||
#include "growtree.h" | ||
%} | ||
%} | ||
|
||
%include growtree.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.