Skip to content

Commit

Permalink
Move comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SavenkovIgor committed Feb 18, 2024
1 parent b893a9a commit 6042235
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/Graph/include/Graph/Forest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,19 @@ class Forest : public Graph<NodeT, EdgeT>

if (edgesToRoots.empty()) {
if (edgesToLeafs.empty()) {
return NodeType::Orphan; // Both empty
// Both empty
return NodeType::Orphan;
} else {
return NodeType::Root; // No connections down, has connections up
// No connections down, has connections up
return NodeType::Root;
}
} else {
if (edgesToLeafs.empty()) {
return NodeType::EndLeaf; // Has connections down, no connections up
// Has connections down, no connections up
return NodeType::EndLeaf;
} else {
return NodeType::MiddleLeaf; // Has both connections, up and down
// Has both connections, up and down
return NodeType::MiddleLeaf;
}
}
}
Expand Down

0 comments on commit 6042235

Please sign in to comment.