... | ... | @@ -2,26 +2,41 @@ |
|
|
|
|
|
An implementation of the Dual-Tree Boruvka algorithm for computing the Euclidean minimum spanning tree of a set of input points.
|
|
|
|
|
|
```prolog
|
|
|
:- use_module('path/to/.../src/methods/emst/emst.pl').
|
|
|
|
|
|
%% usage example
|
|
|
TrainData = [5.1,3.5,1.4, 4.9,3.0,1.4, 4.7,3.2,1.3, 4.6,3.1,1.5],
|
|
|
emst(TrainData, 3, 1, ResultsList, _).
|
|
|
```
|
|
|
|
|
|
# Available Predicates
|
|
|
|
|
|
* [emst/7](https://gitlab.cs.uni-duesseldorf.de/stups/abschlussarbeiten/prolog-mlpack-libary/-/wikis/PrologMethods/Geometry/emst#emst7)
|
|
|
* [emst/5](https://gitlab.cs.uni-duesseldorf.de/stups/abschlussarbeiten/prolog-mlpack-libary/-/wikis/PrologMethods/Geometry/emst#emst5)
|
|
|
|
|
|
---
|
|
|
|
|
|
[links/resources](https://gitlab.cs.uni-duesseldorf.de/stups/abschlussarbeiten/prolog-mlpack-libary/-/wikis/PrologMethods/Geometry/emst#connected-linksresources)
|
|
|
|
|
|
## **_emst/7_**
|
|
|
## **_emst/5_**
|
|
|
|
|
|
Performs the MST calculation using the Dual-Tree Boruvka algorithm.
|
|
|
|
|
|
```prolog
|
|
|
%% part of the predicate definition
|
|
|
emst( +pointer(float_array), +integer, +integer,
|
|
|
%% predicate definition
|
|
|
emst(DataList, DataRows, Naive, ResultsList, YCols) :-
|
|
|
convert_list_to_float_array(DataList, DataRows, array(Xsize, Xrows, X)),
|
|
|
emstI(X, Xsize, Xrows, Naive, Y, YCols, YRows),
|
|
|
convert_float_array_to_2d_list(Y, YCols, YRows, ResultsList).
|
|
|
|
|
|
%% foreign c++ predicate definition
|
|
|
foreign(emst, c, emstI( +pointer(float_array), +integer, +integer,
|
|
|
+integer,
|
|
|
-pointer(float_array), -integer, -integer)
|
|
|
-pointer(float_array), -integer, -integer)).
|
|
|
```
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
| Name | Type | Description | Default |
|
|
|
|------|------|-------------|---------|
|
|
|
| dataset | +matrix | Dataset to build a tree for. | - |
|
... | ... | @@ -34,8 +49,8 @@ emst( +pointer(float_array), +integer, +integer, |
|
|
|
|
|
If you want a more detailed explanation, then go to the python documentation. There is most of the time a good explanation on how the methods work and what the parameters do.
|
|
|
|
|
|
* [**MLpack::emst_C++\_documentation**](https://www.mlpack.org/doc/stable/doxygen/classmlpack_1_1emst_1_1DualTreeBoruvka.html)
|
|
|
* [**MLpack::emst_Python_documentation**](https://www.mlpack.org/doc/stable/python_documentation.html#emst)
|
|
|
* [**MLpack::emst_C++\_documentation**](https://www.mlpack.org/doc/mlpack-3.4.2/doxygen/classmlpack_1_1emst_1_1DualTreeBoruvka.html)
|
|
|
* [**MLpack::emst_Python_documentation**](https://www.mlpack.org/doc/mlpack-3.4.2/python_documentation.html#emst)
|
|
|
|
|
|
added some of the links from the python documentation
|
|
|
|
... | ... | |