56 typename std::vector< Cluster1D >::const_iterator
begin =
values.begin();
57 typename std::vector< Cluster1D >::const_iterator
end =
values.end()-1;
61 #ifdef FsmwClusterizer1DDebug
62 cout <<
"Begin at " << begin->position().value() << endl;
65 const int size = (int) (end-begin);
66 #ifdef FsmwClusterizer1DDebug
68 cout <<
"Size " << size << endl;
74 #ifdef FsmwClusterizer1DDebug
76 cout <<
"Old end at " << end->position().value() << endl;
80 typename std::vector< Cluster1D >::const_iterator new_begin =
begin;
81 typename std::vector< Cluster1D >::const_iterator new_end =
end;
83 #ifdef FsmwClusterizer1DDebug
85 cout <<
"New end at " << end->position().value() << endl;
86 cout <<
"stepsize " << stepsize << endl;
94 double totalweight = end->weight();
95 for (
typename std::vector< Cluster1D >::const_iterator
w=begin;
w!=
end ; ++
w )
97 totalweight+=
w->weight();
100 double div=fabs ( end->position().value() - begin->position().value() ) /
102 #ifdef FsmwClusterizer1DDebug
104 cout <<
"Div at " << begin->position().value() <<
":" << (
end)->
position().value()
105 <<
" = " << div << endl;
108 for (
typename std::vector< Cluster1D >::const_iterator
i = (begin + 1);
109 i!=(begin + size - stepsize + 1); ++
i )
116 double tmpweight = 0.;
117 for (
typename std::vector< Cluster1D >::const_iterator wt=
i; wt!=(
i+stepsize+1); ++wt )
119 tmpweight+=wt->weight();
124 #ifdef FsmwClusterizer1DDebug
127 <<
" = " << tmpdiv << endl;
137 #ifdef FsmwClusterizer1DDebug
139 cout <<
"---- new interval: " << new_begin->position().value()
140 <<
":" << new_end->position().value() << endl;
149 std::pair < typename std::vector< Cluster1D >::const_iterator,
150 typename std::vector< Cluster1D >::const_iterator >
ret ( begin, end );
static int position[264][3]
tuple size
Write out results.