14 #ifndef _MapMatrixProjector_H_ 15 #define _MapMatrixProjector_H_ 99 virtual void changedNTuple();
102 virtual void addPointReps ();
108 bool inRangeWithZ (
int row,
bool flag )
const;
124 virtual void matrixTranspose (
bool yes );
132 unsigned int number );
160 virtual void setNTuple (
const DataSource * ntuple );
162 virtual bool inRange (
int row )
const;
167 virtual Range dataRangeOnValue ()
const;
168 virtual Range valueRange ( )
const;
178 const std::string & getXLabel ()
const;
183 const std::string & getYLabel (
bool flag )
const;
188 const std::string & getZLabel ()
const;
192 virtual double getZValue (
double x,
double y )
const;
203 inline unsigned int calcColumnIndex (
unsigned int row )
const;
208 inline double calcColumnValue (
unsigned int row )
const;
213 inline unsigned int calcRowIndex (
unsigned int row )
const;
218 inline double calcRowValue (
unsigned int row )
const;
222 inline double getXStep ()
const;
226 inline double getYStep ()
const;
230 virtual void prepareValues ();
235 virtual bool isImageConvertable ()
const;
239 virtual void fillProjectedValues (
DataSource * ntuple,
240 bool in_range =
false )
const;
248 if ( m_rows == 0 )
return 0;
258 unsigned int index = calcColumnIndex ( row );
260 return m_x_origin + index * m_x_step + 0.5 * m_x_step;
268 unsigned int column = calcColumnIndex ( row );
270 return row - column * m_rows;
278 unsigned int index = calcRowIndex ( row );
280 return m_y_origin + index * m_y_step + 0.5 * m_y_step;
301 #endif // _MapMatrixProjector_H_ double m_x_step
The step along the X axis.
hippodraw::NTupleProjector class interface
double m_x_origin
The origin along the X axis.
unsigned int m_rows
The number of rows for each column.
std::string m_y_label
The label for the generated y axis.
double m_null_value
The value of the null value.
double m_y_step
The step along the Y axis.
unsigned int m_cols
The number of columns for each row.
double m_y_origin
The origin along the Y axis.
Base class for DataSource.
bool m_transpose
A flag to indicate if the X-Y matrix should be transposed or not.
A derived class of NTupleProjector that maps 1 DataSource column to a Y axis of two dimensional proje...
double getYStep() const
Returns the size of the step along the Y axis.
#define MDL_HIPPOPLOT_API
Expresses a range of values.
The base class for the Projector hierarchy.
std::string m_x_label
The label for the generated x axis.
An NTupleProjector is a projector that projects data from an DataSource object.
double m_scale_factor
The scale factor.
unsigned int calcRowIndex(unsigned int row) const
Calculates the index of the row of the matrix, given the row of the NTuple.
double calcRowValue(unsigned int row) const
Calculates the value of the row coordinate given the row of the NTuple.
double calcColumnValue(unsigned int row) const
Calculates the value of the column coordinate given the row of the NTuple.
double getXStep() const
Returns the size of the step along the X axis.
column
The column indices for 2 dimension data point tuple.
numeric::array clone(numeric::array arr)
unsigned int calcColumnIndex(unsigned int row) const
Calculates the index of the column of the matrix, given the row of the NTuple.