Connects points defined by coordinates X, Y and Z
in a competitive manner to starting trees msttrees
(alternatively: starting positions as index into
X, Y and Z)
using a greedy algorithm which minimizes locally the total amount
of wiring and the path length to the root (with balancing factor bf).
A threshold connection distance thr and a maximal path length
in the tree mplen constrain the resulting tree size.
A sparse distance matrix DIST between nodes
is added to the cost function.
Don't forget to include input tree nodes into the distance matrix DIST!
Option '-b' forbids trifurcations during the process,
option '-t' outputs timelapse trees, see option '-s' for a movie.
For speed and memory considerations an area of close vicinity
is drawn around each tree as it grows.
Example:
Connect hundred randomly distributed points
>> X = rand(100,1)*100; Y = rand(100,1)*100; Z = zeros(100,1);
>> tree = MST_tree (1, [50; X], [50; Y], [0; Z],...
.5, 50, [], [], 'none');
← because input msttrees is "1",
first node in X, Y and Z (at 50, 50, 0) becomes the only root
from which a tree is grown
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License