Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 594312
Collapse All | Expand All

(-)bact-0.13/bact_classify.cpp.old (-3 / +3 lines)
Lines 86-92 Link Here
86
	if (id == -2) continue;
86
	if (id == -2) continue;
87
	if (id != -1) {
87
	if (id != -1) {
88
	  if (userule) 
88
	  if (userule) 
89
	    rules.insert (std::make_pair <std::string, double> (item, alpha[id]));
89
	    rules.insert (std::make_pair(item, alpha[id]));
90
	  result.push_back (id);
90
	  result.push_back (id);
91
	}
91
	}
92
	project (item, size+1, newdepth, l, new_trie_pos, new_str_pos);
92
	project (item, size+1, newdepth, l, new_trie_pos, new_str_pos);
Lines 138-144 Link Here
138
       if (id == -2) continue;
138
       if (id == -2) continue;
139
       if (id >= 0) {
139
       if (id >= 0) {
140
	 if (userule) 
140
	 if (userule) 
141
	   rules.insert (std::make_pair <std::string, double> (tree[i].val.key(), alpha[id]));
141
	   rules.insert (std::make_pair(tree[i].val.key(), alpha[id]));
142
	 result.push_back (id);
142
	 result.push_back (id);
143
       }
143
       }
144
       project (tree[i].val.key(), 1, 0, i, 0, 0);
144
       project (tree[i].val.key(), 1, 0, i, 0, 0);
Lines 158-164 Link Here
158
158
159
    for (std::map <std::string, double>::iterator it = rules.begin();
159
    for (std::map <std::string, double>::iterator it = rules.begin();
160
	 it != rules.end(); ++it) 
160
	 it != rules.end(); ++it) 
161
      tmp.push_back (std::make_pair <std::string, double> (it->first,  it->second));
161
      tmp.push_back (std::make_pair(it->first,  it->second));
162
      
162
      
163
    std::sort (tmp.begin(), tmp.end(), pair_2nd_cmp<std::string, double>());
163
    std::sort (tmp.begin(), tmp.end(), pair_2nd_cmp<std::string, double>());
164
164
(-)bact-0.13/bact_mkmodel.cpp.old (-1 / +1 lines)
Lines 111-117 Link Here
111
   
111
   
112
  for (std::map<std::string, double>::iterator it = rules.begin(); it != rules.end(); ++it) {
112
  for (std::map<std::string, double>::iterator it = rules.begin(); it != rules.end(); ++it) {
113
    double a = it->second / alpha_sum;
113
    double a = it->second / alpha_sum;
114
    ary2.push_back (std::make_pair <const char*, double>(it->first.c_str(), a));
114
    ary2.push_back (std::make_pair(it->first.c_str(), a));
115
    ary.push_back  ((Darts::DoubleArray::key_type *)it->first.c_str());
115
    ary.push_back  ((Darts::DoubleArray::key_type *)it->first.c_str());
116
    alpha.push_back (a);
116
    alpha.push_back (a);
117
  }
117
  }

Return to bug 594312