... | ... | @@ -52,20 +52,24 @@ To connect mlpack and SICStus prolog i used the c interface of SICStus which can |
|
|
|
|
|
is defined a just a long list/vector where you specify its row numbers
|
|
|
|
|
|
currently on the prolog side you have to convert a normal list like \[1, 2, 3\] to a float_array with the help of some helper predicates in helper.pl.
|
|
|
Internally it converts a normal prolog list like \[1, 2, 3\] to a float_array with the help of some of the predicates in helper.pl.
|
|
|
|
|
|
To be then able to convert it into a c++ array, with the c Interface.
|
|
|
|
|
|
input :
|
|
|
* prolog : _+pointer(float_array) (converted list), +integer (list length), +integer (Rows)_
|
|
|
* prolog : \[1,2,3,1,2,3,...\], DataDimensionality(Lenght of each DataPoint)
|
|
|
* c/c++ : _float \* array, SP_integer size, SP_integer rows_
|
|
|
|
|
|
output :
|
|
|
* prolog : _-pointer(float_array) (converted list), -integer (Columns), -integer (Rows)_
|
|
|
* prolog : _\[\[1,2,3\],\[1,2,3\],...\], DataDimensionality_(Lenght of each DataPoint)
|
|
|
* c/c++ : _float \*\*array, SP_integer \*colums, SP_integer \*rows_
|
|
|
* **_vector_**
|
|
|
|
|
|
currently on the prolog side you have to convert a normal list like \[1, 2, 3\] to a float_array with the help of some helper predicates in helper.pl.
|
|
|
When inputing or recieving a vector you just get a normal Prolog List.
|
|
|
|
|
|
Internaly that List gets converted to an float_array from the SICStus struct module to be then able to convert it into a c++ array, with the c Interface.
|
|
|
|
|
|
prolog : _pointer(float_array) (converted list), integer (list length)_
|
|
|
prolog : _\[1,2,3,...\]_
|
|
|
|
|
|
c/c++ : _float \*array, SP_integer size_
|
|
|
|
... | ... | |