33 #include <boost/shared_ptr.hpp>
36 #include "../WTransferable.h"
73 virtual const std::string
getName()
const;
111 size_t merge(
size_t i,
size_t j,
double height );
126 const std::vector< size_t >&
getParents()
const;
133 const std::vector< double >&
getHeights()
const;
144 void reset(
size_t n );
168 return "WDendrogram";
173 return "A Dendrogram as a array with additional heights for each inner node.";
177 #endif // WDENDROGRAM_H
const std::vector< double > & getHeights() const
Const reference to the heights array.
static boost::shared_ptr< WPrototyped > getPrototype()
Returns a prototype instantiated with the true type of the deriving class.
std::vector< size_t > m_parents
Stores the parents of leafs as well as of inner nodes.
virtual const std::string getDescription() const
Gets the description for this prototype.
void reset(size_t n)
Resets the whole dendrogram to the number of elements it should be used for.
const std::vector< size_t > & getParents() const
Returns const reference to the internal parents array.
void checkAndThrowExceptionIfUsedUninitialized(std::string caller) const
Checks if this instance is initialized.
std::vector< double > m_heights
Stores only for the inner nodes their heights.
size_t merge(size_t i, size_t j, double height)
Merges two elements (either inner nodes or leafs) given via the indices i and j.
WDendrogram()
Default constructs an empty dendrogram.
TestSuite for the WDendrogram class.
Class building the interface for classes that might be transferred using WModuleConnector.
std::string toString() const
Transform this dendrogram into a string, where each leaf or inner node is mapped to a special string...
static boost::shared_ptr< WPrototyped > m_prototype
The prototype as singleton.
virtual const std::string getName() const
Gets the name of this prototype.
Hirachical binary tree datastructure with spatial layout information called dendrogram.