53 typename std::vector<Cluster1D>::const_iterator
begin =
values.begin();
54 typename std::vector<Cluster1D>::const_iterator
end =
values.end() - 1;
57 #ifdef FsmwClusterizer1DDebug
58 cout <<
"Begin at " << begin->position().value() << endl;
61 const int size = (int)(end - begin);
62 #ifdef FsmwClusterizer1DDebug
64 cout <<
"Size " << size << endl;
70 #ifdef FsmwClusterizer1DDebug
72 cout <<
"Old end at " << end->position().value() << endl;
76 typename std::vector<Cluster1D>::const_iterator new_begin =
begin;
77 typename std::vector<Cluster1D>::const_iterator new_end =
end;
79 #ifdef FsmwClusterizer1DDebug
81 cout <<
"New end at " << end->position().value() << endl;
82 cout <<
"stepsize " << stepsize << endl;
90 double totalweight = end->weight();
91 for (
typename std::vector<Cluster1D>::const_iterator
w = begin;
w !=
end; ++
w) {
92 totalweight +=
w->weight();
95 double div = fabs(end->position().value() - begin->position().value()) / totalweight;
96 #ifdef FsmwClusterizer1DDebug
98 cout <<
"Div at " << begin->position().value() <<
":" << (
end)->
position().value() <<
" = " << div << endl;
101 for (
typename std::vector<Cluster1D>::const_iterator
i = (begin + 1);
i != (begin + size - stepsize + 1); ++
i) {
107 double tmpweight = 0.;
108 for (
typename std::vector<Cluster1D>::const_iterator wt =
i; wt != (
i + stepsize + 1); ++wt) {
109 tmpweight += wt->weight();
112 double tmpdiv = fabs(
i->position().value() - (
i +
stepsize)->
position().value()) / tmpweight;
113 #ifdef FsmwClusterizer1DDebug
115 cout <<
"Div at " <<
i->position().value() <<
":" << (
i +
stepsize)->
position().value() <<
" = " << tmpdiv
125 #ifdef FsmwClusterizer1DDebug
127 cout <<
"---- new interval: " << new_begin->position().value() <<
":" << new_end->position().value() << endl;
136 std::pair<typename std::vector<Cluster1D>::const_iterator,
typename std::vector<Cluster1D>::const_iterator>
ret(
tuple ret
prodAgent to be discontinued
static int position[264][3]
tuple size
Write out results.