NCBI C++ ToolKit
Macros | Functions | Variables
clusterer_unit_test.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbi_system.hpp>
#include <algo/cobalt/clusterer.hpp>
#include <math.h>
#include <corelib/test_boost.hpp>
+ Include dependency graph for clusterer_unit_test.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define NCBI_BOOST_NO_AUTO_TEST_MAIN
 

Functions

 USING_SCOPE (cobalt)
 
 BOOST_AUTO_TEST_CASE (TestSingleCluster)
 
 BOOST_AUTO_TEST_CASE (TestClusterer)
 
static void s_ReadDistMatrix (const string &filename, CClusterer::TDistMatrix &dmat)
 Read distance matrix from file. More...
 
static void s_TestTree (vector< bool > &elems, const TPhyTreeNode *node)
 
static void s_TestClusterTree (const CClusterer::TSingleCluster &cluster, const TPhyTreeNode *tree)
 
static void s_TestClustersAndTrees (int num_elems, CClusterer &clusterer, const string &ref_filename="")
 Check clusters. More...
 
 BOOST_AUTO_TEST_CASE (TestNoLinks)
 
 BOOST_AUTO_TEST_CASE (TestOneElement)
 
 BOOST_AUTO_TEST_CASE (TestTwoElementsOneCluster)
 
 BOOST_AUTO_TEST_CASE (TestTwoElementsTwoClusters)
 
 BOOST_AUTO_TEST_CASE (TestMoreElements)
 
 BOOST_AUTO_TEST_CASE (TestPrecomputedClusters)
 
 BOOST_AUTO_TEST_CASE (TestIncremental)
 

Variables

 USING_NCBI_SCOPE
 

Macro Definition Documentation

◆ NCBI_BOOST_NO_AUTO_TEST_MAIN

#define NCBI_BOOST_NO_AUTO_TEST_MAIN

Definition at line 51 of file clusterer_unit_test.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/9]

BOOST_AUTO_TEST_CASE ( TestClusterer  )

◆ BOOST_AUTO_TEST_CASE() [2/9]

BOOST_AUTO_TEST_CASE ( TestIncremental  )

◆ BOOST_AUTO_TEST_CASE() [3/9]

BOOST_AUTO_TEST_CASE ( TestMoreElements  )

◆ BOOST_AUTO_TEST_CASE() [4/9]

BOOST_AUTO_TEST_CASE ( TestNoLinks  )

◆ BOOST_AUTO_TEST_CASE() [5/9]

BOOST_AUTO_TEST_CASE ( TestOneElement  )

◆ BOOST_AUTO_TEST_CASE() [6/9]

BOOST_AUTO_TEST_CASE ( TestPrecomputedClusters  )

◆ BOOST_AUTO_TEST_CASE() [7/9]

BOOST_AUTO_TEST_CASE ( TestSingleCluster  )

◆ BOOST_AUTO_TEST_CASE() [8/9]

BOOST_AUTO_TEST_CASE ( TestTwoElementsOneCluster  )

◆ BOOST_AUTO_TEST_CASE() [9/9]

BOOST_AUTO_TEST_CASE ( TestTwoElementsTwoClusters  )

◆ s_ReadDistMatrix()

static void s_ReadDistMatrix ( const string filename,
CClusterer::TDistMatrix dmat 
)
static

Read distance matrix from file.

Parameters
filenameFilename [in]
dmatDistance matrix [out]

Definition at line 150 of file clusterer_unit_test.cpp.

References i, int, CNcbiMatrix< T >::Resize(), and val.

Referenced by BOOST_AUTO_TEST_CASE().

◆ s_TestClustersAndTrees()

static void s_TestClustersAndTrees ( int  num_elems,
CClusterer clusterer,
const string ref_filename = "" 
)
static

Check clusters.

Parameters
dmatDistance matrix [in]
clustersClusters to examine [in]
treesCluster trees to examine [in]
ref_filenameName of filename containing reference clusters data [in]

Definition at line 238 of file clusterer_unit_test.cpp.

References CClusterer::GetClusters(), CClusterer::GetTrees(), i, ITERATE, s_TestClusterTree(), and ncbi::grid::netcache::search::fields::size.

Referenced by BOOST_AUTO_TEST_CASE().

◆ s_TestClusterTree()

static void s_TestClusterTree ( const CClusterer::TSingleCluster cluster,
const TPhyTreeNode tree 
)
static

Definition at line 203 of file clusterer_unit_test.cpp.

References i, int, ITERATE, s_TestTree(), and CClusterer::CSingleCluster::size().

Referenced by s_TestClustersAndTrees().

◆ s_TestTree()

static void s_TestTree ( vector< bool > &  elems,
const TPhyTreeNode node 
)
static

◆ USING_SCOPE()

USING_SCOPE ( cobalt  )

Variable Documentation

◆ USING_NCBI_SCOPE

USING_NCBI_SCOPE

Definition at line 59 of file clusterer_unit_test.cpp.

Modified on Mon Jun 17 05:09:15 2024 by modify_doxy.py rev. 669887