35 #ifndef SHARK_MODELS_CLUSTERING_HIERARCHICALCLUSTERING_H 36 #define SHARK_MODELS_CLUSTERING_HIERARCHICALCLUSTERING_H 58 template <
class InputT>
80 {
return "HierarchicalClustering"; }
93 std::size_t numPatterns =
batchSize(patterns);
94 BatchOutputType memberships(numPatterns);
95 for(std::size_t i = 0; i != numPatterns; ++i){
99 if (tree->
isLeft(row(patterns,i))){
103 memberships(i) += unsigned((tree->
left()->
nodes() + 1) / 2);
104 tree = tree->
right();