(
void) {m_Elements.clear();}
118 size_t size(
void)
const{
returnm_Elements.size();}
125 intFindCenterElement(
const TDistMatrix& dmatrix)
const;
130 constvector<int>&
GetElements(
void)
const{
returnm_Elements;}
136 intoperator[](
size_tindex)
const;
195 voidSetDistMatrix(shared_ptr<TDistMatrix>& dmat);
254 voidComputeClusters(
doublemax_diam,
256 booldo_trees =
true,
261 voidComputeClustersFromLinks(
void);
267 constTSingleCluster& GetSingleCluster(
size_tindex)
const;
283 intGetClusterId(
intelem)
const;
288 voidGetTrees(vector<TPhyTreeNode*>& trees)
const;
293 voidReleaseTrees(vector<TPhyTreeNode*>& trees);
297vector<TPhyTreeNode*>&
GetTrees(
void) {
returnm_Trees;}
313 voidSetPrototypes(
void);
319 voidGetClusterDistMatrix(
intindex, TDistMatrix& mat)
const;
349 voidx_JoinClustElem(
intcluster_id,
intelem,
doubledist);
352 voidx_JoinClusters(
intcluster1_id,
intcluster2_id,
doubledist);
355 voidx_CreateCluster(
intelem);
364 boolx_CanAddElem(
intcluster_id,
intelem,
double& dist)
const;
373 boolx_CanJoinClusters(
intcluster1_id,
intcluster2_id,
374 double& dist)
const;
Exceptions for CClusterer class.
NCBI_EXCEPTION_DEFAULT(CClustererException, CException)
@ eElementOutOfRange
Cluster element is larger than distance matrix size.
@ eElemIndexOutOfRange
Index of cluster element out of range.
@ eClusterIndexOutOfRange
Index of cluster out of range.
@ eNoDistMatrix
Distance matrix not assigned.
CSingleCluster(void)
Create empty cluster.
void SetPrototype(int el)
Set cluster prototype.
const_iterator begin(void) const
void clear(void)
Removes all elements from the cluster.
int GetPrototype(void) const
Get cluster prototype.
size_t size(void) const
Get cluster size.
TPhyTreeNode * m_Tree
Cluster tree root.
void AddElement(int el)
Add element to the cluster.
double m_Diameter
Max distance between elements.
vector< int > m_Elements
List of indeces of cluster elements.
int m_Prototype
Index of cluster representative element.
const vector< int > & GetElements(void) const
Get list of cluster elements.
vector< int >::iterator iterator
vector< int >::const_iterator const_iterator
double GetMaxDistance(void) const
Get maximum distance in cluster.
vector< double > m_DistToRoot
Distances between cluster elements and tree root.
const_iterator end(void) const
void SetMaxDistance(double dist)
Set maximum distance in cluster.
Interface for CClusterer class used for clustering any type of data based on distance matrix.
vector< TPhyTreeNode * > & GetTrees(void)
Get list of trees for clusters.
list< int > m_UnusedEntries
void SetMaxClusterDiameter(double diam)
Set maximum diameter for single cluster.
double GetMaxClusterDiameter(void) const
Get maximum diameter for single cluster.
EClustMethod
Method for clustering from links.
EDistMethod
Method for computing distance between clusters.
shared_ptr< TDistMatrix > m_DistMatrix
CClusterer & operator=(const CClusterer &)
Forbid assignment operator.
void SetReportSingletons(bool b)
Set reporting of single element clusters.
CNcbiMatrix< double > TDistMatrix
EClustMethod GetClustMethod(void) const
Get clustering method for links.
CSingleCluster TSingleCluster
bool GetReportSingletons(void) const
Get reporting mode for single element clusters.
void SetMakeTrees(bool trees)
Set make cluster tree/dendrogram option.
vector< int > m_ClusterId
const TClusters & GetClusters(void) const
Get clusters.
void SetClustMethod(EClustMethod method)
Set clustering method for links.
CClusterer(const CClusterer &)
Forbid copy constructor.
vector< TSingleCluster > TClusters
vector< TPhyTreeNode * > m_Trees
TClusters & SetClusters(void)
Set clusters.
CClusterer(shared_ptr< TDistMatrix > &dmat)
Create clusterer.
EClustMethod m_LinkMethod
void PurgeDistMatrix(void)
Delete distance matrix.
definition of a Culling tree
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
void Run(void)
Enter the main loop.
#define NCBI_COBALT_EXPORT
NCBI C++ auxiliary debug macros.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4