Пример #1
0
template<typename EXAMPLE> Weights ExamplePtrs<EXAMPLE>::current_weight() const {
	Weights w;
	for (typename ExamplePtrs<EXAMPLE>::const_iterator e = this->begin(); e != this->end(); e++)
		w.add((*e)->weight(), (*e)->is_correct());
	return w;
}
Пример #2
0
template<typename EXAMPLE> Weights Examples<EXAMPLE>::initial_weight() const {
	Weights w;
	for (typename Examples<EXAMPLE>::const_iterator e = this->begin(); e != this->end(); e++)
		w.add(e->initial_weight(), e->is_correct());
	return w;
}