diff --git a/lieonn.hh b/lieonn.hh index f3f85eaa..6727b7ad 100644 --- a/lieonn.hh +++ b/lieonn.hh @@ -4178,7 +4178,7 @@ template pair >, vector >, pair pair > >, vector > > > predVec(const vector > >& in0, const int& cj = 11) { assert(in0.size() && in0[0].size() && in0[0][0].size() && 0 < cj); - if(19683 < in0[0].size() * in0[0][0].size()) + if(19683 * cj < in0[0].size() * in0[0][0].size()) cerr << "predVec : elements larger than 19683, exceeds function entropy." << endl; vector > in; in.resize(in0.size()); @@ -4201,8 +4201,8 @@ template pair > >, vector pair > >, vector pair > >, vector > > > predMat(const vector > >& in0, const int& cj = 11) { assert(in0.size() && in0[0].size() && in0[0][0].rows() && in0[0][0].cols()); - if(19683 < in0[0].size() * in0[0][0].rows() * in0[0][0].cols()) - cerr << "predMat : elements larger than 19683, exceeds function entropy." << endl; const int ccj(ceil(sqrt(T(cj)))); assert(0 < ccj); + if(ccj * ccj * 19683 < in0[0].size() * in0[0][0].rows() * in0[0][0].cols()) + cerr << "predMat : elements larger than 19683, exceeds function entropy." << endl; vector > in; in.resize(in0.size()); for(int i = 0; i < in0.size(); i ++) { @@ -4289,12 +4289,12 @@ template pair > >, vector pair >, vector > > predSTen(const vector >& in0, const vector& idx, const int& cj = 11) { assert(idx.size() && in0.size()); - if(19683 < idx.size() * idx.size() * idx.size()) - cerr << "predSTen : elements larger than 19683, exceeds function entropy." << endl; // N.B.: we don't do input scaling. // const int ccj(ceil(pow(T(cj), T(int(1)) / T(int(3)) )) ); const int ccj(1); assert(0 < ccj); + if(ccj * ccj * ccj * 19683 < idx.size() * idx.size() * idx.size()) + cerr << "predSTen : elements larger than 19683, exceeds function entropy." << endl; // N.B. the data we target is especially string stream corpus. // they are incontinuous one, so complementing with continuous stream // shouldn't improve outputs.