Functions
contrib/mul/mbl/mbl_minimum_spanning_tree.cxx File Reference
#include "mbl_minimum_spanning_tree.h"
#include <vnl/vnl_matrix.h>
#include <vnl/vnl_vector.h>
#include <vcl_algorithm.h>

Go to the source code of this file.

Functions

void mbl_minimum_spanning_tree (const vnl_matrix< double > &D, vcl_vector< vcl_pair< int, int > > &pairs)
 Compute the minimum spanning tree given a distance matrix.
void mbl_minimum_spanning_tree (const vcl_vector< vgl_point_2d< double > > &pts, vcl_vector< vcl_pair< int, int > > &pairs)
 Compute the minimum spanning tree of given points.
void mbl_minimum_spanning_tree (const vcl_vector< vgl_point_3d< double > > &pts, vcl_vector< vcl_pair< int, int > > &pairs)
 Compute the minimum spanning tree of given points.

Detailed Description

Definition in file mbl_minimum_spanning_tree.cxx.


Function Documentation

void mbl_minimum_spanning_tree ( const vnl_matrix< double > &  D,
vcl_vector< vcl_pair< int, int > > &  pairs 
)

Compute the minimum spanning tree given a distance matrix.

Parameters:
pairs[0].firstis the root node Tree defined by pairs.
pairs[i].secondis linked to
pairs[i].firstWe compute the minimum spanning tree of the graph using Prim's algorithm.

Definition at line 35 of file mbl_minimum_spanning_tree.cxx.

void mbl_minimum_spanning_tree ( const vcl_vector< vgl_point_2d< double > > &  pts,
vcl_vector< vcl_pair< int, int > > &  pairs 
)

Compute the minimum spanning tree of given points.

Parameters:
pairs[0].firstis the root node Tree defined by pairs.
pairs[i].secondis linked to
pairs[i].firstWe compute the minimum spanning tree of the graph using Prim's algorithm.

Definition at line 66 of file mbl_minimum_spanning_tree.cxx.

void mbl_minimum_spanning_tree ( const vcl_vector< vgl_point_3d< double > > &  pts,
vcl_vector< vcl_pair< int, int > > &  pairs 
)

Compute the minimum spanning tree of given points.

Parameters:
pairs[0].firstis the root node Tree defined by pairs.
pairs[i].secondis linked to
pairs[i].firstWe compute the minimum spanning tree of the graph using Prim's algorithm.

Definition at line 87 of file mbl_minimum_spanning_tree.cxx.