Skip to content

Commit

Permalink
scorecomplex many against many bug fixed real final
Browse files Browse the repository at this point in the history
  • Loading branch information
Woosub-Kim committed Jan 4, 2024
1 parent 1c4fdfa commit 49dabe0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/strucclustutils/scorecomplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class DBSCANCluster {

unsigned int clusterAlns() {
initializeAlnLabels();
if (recursiveNum==0 && searchResult.alnVec.size() == idealClusterSize) {
if (recursiveNum==0 && searchResult.alnVec.size() <= idealClusterSize) {
checkClusteringNecessity();
}
if (++recursiveNum > MAX_RECURSIVE_NUM) return UNCLUSTERED;
Expand Down Expand Up @@ -424,7 +424,7 @@ class DBSCANCluster {

unsigned int finishDBSCAN() {
initializeAlnLabels();
if (prevMaxClusterSize < minClusterSize) return UNCLUSTERED;
if (prevMaxClusterSize < minClusterSize || bestClusters.empty()) return UNCLUSTERED;
cLabel = CLUSTERED;
for (auto &cluster: bestClusters) {
for (auto alnIdx: cluster) {
Expand All @@ -442,6 +442,7 @@ class DBSCANCluster {
}
if (checkChainRedundancy())
return UNCLUSTERED;
prevMaxClusterSize = neighbors.size();
bestClusters.emplace_back(neighbors);
return finishDBSCAN();
}
Expand Down

0 comments on commit 49dabe0

Please sign in to comment.