14 #ifndef _ProjectorBase_H_
15 #define _ProjectorBase_H_
22 #include <msdevstudio/MSconfig.h>
115 virtual void addPointReps () = 0;
140 virtual void setAxisBinding (
const std::string & axis,
141 const std::string & label );
146 virtual void matrixTranspose (
bool yes );
155 void setAxisBindings (
const std::vector < std::string > & bindings );
163 virtual const std::vector < std::string > & getAxisBindings ()
const;
171 virtual bool isEmpty ()
const = 0;
181 virtual void prepareValues ();
195 bool isDirty ()
const;
198 virtual void setDirty (
bool value =
true );
203 virtual int getNumberOfBins (
Axes::Type )
const;
214 virtual bool isAxisBinned (
const std::string & axis )
const;
220 virtual bool isValueBinned ()
const;
223 virtual const std::string & getTitle()
const = 0;
231 virtual Range valueRange ()
const = 0;
246 bool const_width =
true );
251 virtual double getPosOn (
Axes::Type )
const = 0;
260 virtual void setNumberOfBins (
Axes::Type axis,
261 unsigned int number );
289 virtual void setOffset (
const std::string & axis,
300 virtual void setOffset (
Axes::Type axis,
double offset );
306 virtual void reset ();
316 virtual double getOffset (
Axes::Type axis )
const;
324 virtual double getBinWidth (
Axes::Type axis )
const;
328 virtual const std::string & getXLabel()
const = 0;
336 virtual const std::string & getYLabel (
bool flag =
false )
const = 0;
340 virtual const std::string & getZLabel()
const;
344 virtual int indexOf (
const std::string & label )
const;
351 virtual int getNumberOfEntries ()
const = 0;
354 virtual int getUnderflow ()
const = 0;
357 virtual int getOverflow ()
const = 0;
363 virtual double getAverage(
Axes::Type axis)
const;
371 virtual double getZValue (
double x,
double y )
const;
377 virtual void addValues (
const std::vector < double > &
v );
380 const std::vector < std::string > & getPointReps()
const;
387 virtual DataSource * createNTuple ()
const = 0;
391 const DataSource * getProjectedValues ()
const;
393 virtual const DataSource * createOldStyleNTuple ()
const;
398 virtual NTuple * getNTupleAfterCuts ()
const;
403 virtual void fillColumnAfterCuts(
const std::string &
column,
404 std::vector<double> & columnData)
const;
411 NTuple * createNTupleWith (
const std::vector< TupleCut > & cut_list )
const;
420 virtual bool wantsScaleFactor (
const std::string & axis )
const;
434 virtual void normalizeTo (
double norm );
439 virtual void setNormalizing (
bool on );
452 virtual void checkScaling ();
457 const std::vector <double> & getZValues();
461 const std::vector <unsigned int> & getShape();
465 const std::vector <double> & getZAfterTransform(
TransformBase * transform);
472 virtual bool hasDataSourceBindings ()
const;
476 virtual void setMinEntries(
int entries );
480 virtual int getMinEntries ( );
488 virtual bool isImageConvertable ()
const;
494 #endif // _ProjectorBase_H_
#define MDL_HIPPOPLOT_API
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
AxisModelBase * m_x_axis
The AxisModel along the X axis.
A transform that transforms coordinates from one coordinate system to another.
std::vector< double > m_zval
Sorted Z values in this projector.
column
The column indices for 2 dimension data point tuple.
bool m_isDirty
Marks the object as dirty.
AxisModelBase * m_z_axis
The AxisModel along the Z axis.
numeric::array clone(numeric::array arr)
Observable class interface.
The AxisModelBase class maintains the Range and scaling of an axis.
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
A DataSource class implemented with std::vector<double> to store the column data. ...
The base class for the Projector hierarchy.
double norm(const std::vector< double > &a)
Computes the two norm of the vector.
DataSource * m_proj_values
The NTuple representing the result of the projection.
Expresses a range of values.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
AxisModelBase * m_y_axis
The AxisModel along the Y axis.
std::string m_z_label
Dummy member so that getZLabel can return a reference.
Observer class interface.
const ProjectorBase * m_target
The target projector.
Base class for DataSource.