29 ProcSplitter(
const char *
name,
32 ~ProcSplitter()
override {}
34 void configure(ConfIterator iter,
unsigned int n)
override;
35 void eval(ValueIterator iter,
unsigned int n)
const override;
36 std::vector<double> deriv(
37 ValueIterator iter,
unsigned int n)
const override;
45 ProcSplitter::ProcSplitter(
const char *
name,
53 void ProcSplitter::configure(ConfIterator iter,
unsigned int n)
56 for(
unsigned int i = 0;
i <
count;
i++)
57 iter << Variable::FLAG_OPTIONAL;
58 iter << iter++(Variable::FLAG_ALL);
62 void ProcSplitter::eval(ValueIterator iter,
unsigned int n)
const 66 while(i < iter.size()) {
78 std::vector<double> ProcSplitter::deriv(
79 ValueIterator iter,
unsigned int n)
const 81 unsigned int size = 0;
82 for(ValueIterator iter2 = iter; iter2; ++iter2)
85 std::vector<double>
result(size * size);
86 for(
unsigned int i = 0; i <
size; i++)
87 result[i * size + i] = 1.0;