Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
integeruser committed Aug 25, 2017
1 parent 97c9d59 commit 44d8cf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/fptree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ FPTree::FPTree(const std::vector<Transaction>& transactions, uint64_t minimum_su
// insert item in the tree

// check if curr_fpnode has a child curr_fpnode_child such that curr_fpnode_child.item = item
const auto it = std::find_if( curr_fpnode->children.cbegin(),
curr_fpnode->children.cend(), [item](const std::shared_ptr<FPNode>& fpnode) {
return fpnode->item == item;
const auto it = std::find_if(
curr_fpnode->children.cbegin(), curr_fpnode->children.cend(), [item](const std::shared_ptr<FPNode>& fpnode) {
return fpnode->item == item;
} );
if ( it == curr_fpnode->children.cend() ) {
// the child doesn't exist, create a new node
Expand Down
12 changes: 6 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ void test_1()
{ b, c, e }
};

const auto minimum_support_treshold = 2;
const auto minimum_support_threshold = 2;

const FPTree fptree{ transactions, minimum_support_treshold };
const FPTree fptree{ transactions, minimum_support_threshold };

const std::set<Pattern> patterns = fptree_growth( fptree );

Expand Down Expand Up @@ -72,9 +72,9 @@ void test_2()
{ b, c, d },
};

const auto minimum_support_treshold = 3;
const auto minimum_support_threshold = 3;

const FPTree fptree{ transactions, minimum_support_treshold };
const FPTree fptree{ transactions, minimum_support_threshold };

const std::set<Pattern> patterns = fptree_growth( fptree );

Expand Down Expand Up @@ -128,9 +128,9 @@ void test_3()
{ a, f, c, e, l, p, m, n }
};

const auto minimum_support_treshold = 3;
const auto minimum_support_threshold = 3;

const FPTree fptree{ transactions, minimum_support_treshold };
const FPTree fptree{ transactions, minimum_support_threshold };

const std::set<Pattern> patterns = fptree_growth( fptree );

Expand Down

0 comments on commit 44d8cf8

Please sign in to comment.