14 #include "msdevstudio/MSconfig.h"
33 using namespace hippodraw;
35 #ifdef ITERATOR_MEMBER_DEFECT
39 using std::accumulate;
74 m_x_label ( projector.m_x_label ),
75 m_y_label ( projector.m_y_label ),
76 m_cols ( projector.m_cols ),
77 m_rows ( projector.m_rows ),
78 m_x_step ( projector.m_x_step ),
79 m_y_step ( projector.m_y_step ),
80 m_x_origin ( projector.m_x_origin ),
81 m_y_origin ( projector.m_y_origin ),
82 m_null_value ( projector.m_null_value ),
83 m_transpose ( projector.m_transpose )
192 bool in = x_range.
includes ( lvalue ) ||
193 x_range.
includes ( lvalue + m_x_step );
201 y_range.
includes ( bvalue + m_y_step );
205 if ( accept && use_z ==
true ) {
208 accept &= z_range.
includes ( value );
226 namespace dp = hippodraw::DataPoint3DTuple;
235 return Range ( 0.0, 1.0, 0.5 );
239 return Range ( values );
252 if ( m_x_step < 0. ) {
261 if ( m_y_step < 0. ) {
283 double low = DBL_MAX;
284 double pos = DBL_MAX;
285 double high = -DBL_MIN;
288 std::size_t rows =
m_ntuple -> rows ();
289 unsigned int used = 0;
290 for (
unsigned int row = 0; row < rows; row++ ) {
294 low = std::min ( low, value );
296 pos = std::min ( pos, value );
298 high = std::max ( high, value );
358 unsigned int col = 3;
379 const vector < double > &
data = ntuple -> getColumn ( col );
381 unsigned int size = ntuple -> rows ();
384 sum = accumulate ( data.begin(), data.end(), sum );
401 unsigned int size = ntuple->
rows ();
402 double s = static_cast <
double > (
size );
403 double side = sqrt ( s );
405 m_rows = static_cast <
unsigned int > ( side );
406 m_cols = static_cast <
unsigned int > ( side );
429 unsigned int i_x = static_cast <
unsigned int> ( xx );
430 unsigned int i_y = static_cast <
unsigned int> ( yy );
455 unsigned int columns = 6;
459 ntuple -> setLabelAt (
getXLabel (), 0 );
460 ntuple -> setLabelAt (
getYLabel (
false ), 1 );
461 ntuple -> setLabelAt (
getZLabel (), 2 );
462 ntuple -> setLabelAt (
"Width", 3 );
463 ntuple -> setLabelAt (
"Height", 4 );
464 if ( z_err < UINT_MAX ) {
465 ntuple -> setLabelAt (
m_ntuple -> getLabelAt ( z_err ), 5 );
468 ntuple -> setLabelAt (
"Error", 5 );
494 for (
unsigned int i = 0; i <
m_cols; i++ ) {
502 for (
unsigned int j = 0; j <
m_rows; j++ ) {
510 index = i + m_cols * j;
513 index = i * m_rows + j;
531 ntuple -> addRow ( row );
536 vector < unsigned int >
shape ( 3 );
541 ntuple -> setShape ( shape );