29 ProcClassed(
const char *
name,
32 ~ProcClassed()
override {}
34 void configure(ConfIterator iter,
unsigned int n)
override;
35 void eval(ValueIterator iter,
unsigned int n)
const override;
38 unsigned int nClasses;
43 ProcClassed::ProcClassed(
const char *
name,
47 nClasses(calib->nClasses)
51 void ProcClassed::configure(ConfIterator iter,
unsigned int n)
56 iter(Variable::FLAG_NONE);
57 for(
unsigned int i = 0;
i < nClasses;
i++)
58 iter << Variable::FLAG_NONE;
61 void ProcClassed::eval(ValueIterator iter,
unsigned int n)
const 63 unsigned int value = (
unsigned int)(*iter + 0.5);
65 for(
unsigned int i = 0;
i < nClasses;
i++)
66 iter(
i == value ? 1.0 : 0.0);