本文整理汇总了C++中END_SECTION::averageSilhouetteWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ END_SECTION::averageSilhouetteWidth方法的具体用法?C++ END_SECTION::averageSilhouetteWidth怎么用?C++ END_SECTION::averageSilhouetteWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类END_SECTION
的用法示例。
在下文中一共展示了END_SECTION::averageSilhouetteWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: asw
matrix.setValue(5,4,0.8f);
vector<float> asw(5);
asw[0]=0.170833f;
asw[1]=0.309722f;
asw[2]=0.306412f;
asw[3]=0.125744f;
asw[4]=0;
vector< BinaryTreeNode > tree;
tree.push_back(BinaryTreeNode(1,2,0.3f));
tree.push_back(BinaryTreeNode(3,4,0.4f));
tree.push_back(BinaryTreeNode(0,1,0.5f));
tree.push_back(BinaryTreeNode(0,3,0.6f));
tree.push_back(BinaryTreeNode(0,5,0.7f));
vector<float> result = ptr->averageSilhouetteWidth(tree, matrix);
TEST_EQUAL(result.size(), asw.size());
for (Size i = 0; i < result.size(); ++i)
{
TOLERANCE_ABSOLUTE(0.001);
TEST_REAL_SIMILAR(result[i], asw[i]);
}
}
END_SECTION
START_SECTION((std::vector< float > dunnIndices(const std::vector<BinaryTreeNode>& tree, const DistanceMatrix<float>& original, const bool tree_from_singlelinkage = false)))
{
DistanceMatrix<float> matrix(6,666);
matrix.setValue(1,0,0.5f);
matrix.setValue(2,0,0.8f);