Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning #8

Merged
merged 44 commits into from
Apr 8, 2019
Merged

Cleaning #8

merged 44 commits into from
Apr 8, 2019

Conversation

GinnyAquarius
Copy link
Contributor

No description provided.

src/Harmony.cpp Outdated
assert(i < (result.size() - 1) && "Index must be smaller than number of columns");
//result.fill(2); //default is 2
for (int i = 0; i < col_idx.length(); ++i) {
assert( 0 < col_idx[i] && col_idx[i] <= (result.size()) && "Index must be smaller than number of columns");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lỗi của anh. Nên throw exception ra chứ không nên assert, ngó qua bên API của anh Hoà nhé.

src/Harmony.cpp Outdated
for (c_it = mtx.begin_col(i); c_it != mtx.end_col(i); ++c_it) {
if (cluster[i] != cid)
continue;
assert(bin_cnt > 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

như trên

src/Harmony.cpp Outdated
//res[i].first += count[i][j].first * (prob[j]);
//res[i].second += count[i][j].second * (prob[j]);
if (cnt_both >= thres) {
std::get<0>(res[i]) += HarmonicMean((double)cnt_in/total_in,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dùng ngoặc vuông cho index thứ hai luôn đươc không em?

src/Harmony.cpp Outdated
for (int i = 0; i < mtx.n_cols; ++i)
if (cluster[i] == cid)
++total_in;
for (int i = 0; i < mtx.n_cols; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chỗ này total_in bằng với col_idx.size() mà em.

@TriLe965 TriLe965 merged commit cc4026a into master Apr 8, 2019
@TriLe965 TriLe965 deleted the cleaning branch April 8, 2019 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants