oh::GraphDataI< T > Class Template Reference

#include <GraphData.h>

List of all members.

Public Member Functions

 GraphDataI ()
 ~GraphDataI ()
void set_title (const std::string &t)
std::string get_title () const
void set_annotations (const std::vector< std::pair< std::string, std::string > > &ann)
void get_annotations (std::vector< std::pair< std::string, std::string > > &ann) const
void set_axis_title (oh::Axis::ID axis, const std::string &label)
const std::string & get_axis_title (oh::Axis::ID axis) const
std::vector< long > & indices (oh::Axis::ID axis)
const std::vector< long > & get_indices (oh::Axis::ID axis) const
std::vector< std::string > & labels (oh::Axis::ID axis)
const std::vector< std::string > & get_labels (oh::Axis::ID axis) const
oh::Axis::Kind get_axis_type (oh::Axis::ID axis) const
long get_bin_count (oh::Axis::ID axis) const
const std::vector< double > & get_axis_range (oh::Axis::ID axis) const
void get_axis_range (oh::Axis::ID axis, double &low, double &binwidth) const
void set_axis_range (oh::Axis::ID axis, const std::vector< double > &xbins)
void set_axis_range (oh::Axis::ID axis, const double *edges, unsigned long size)
void set_axis_range (oh::Axis::ID axis, double low, double binwidth, unsigned long nbins)
void get_errors (std::vector< const double * > &errorArrays) const
void set_errors (const std::vector< const double * > &errorArrays)
void set_error_style (typename T::ErrorStyle es)
T::ErrorStyle get_error_style () const
unsigned long get_entries () const
void set_entries (unsigned long entries)
 Update the number of points.
void get_points (std::vector< const double * > &valueArrays) const
void get_data (std::vector< const double * > &data) const
void set_points (const std::vector< const double * > &valueArrays)


Detailed Description

template<class T>
class oh::GraphDataI< T >

Interface to the IS Graph class. The Graph object to work on must be given in the constructor.
When setting the data via arrays, be sure that the arrays have the appropiate size (which is the number of graph points), this is not checked. Do set_dimension and set_entries before setting the data and do set_errorstyle before setting the errors.


Constructor & Destructor Documentation

template<class T>
oh::GraphDataI< T >::GraphDataI (  ) 

Default constructor: Pass the reference of the Graph object to work on. Remember that the reference hast to be valid as long as you use the interface. is_new should be set to true when your Graph object is uninitialized, in order to avoid that GraphDataI tries to access unitialized data.

template<class T>
oh::GraphDataI< T >::~GraphDataI (  )  [inline]

destructor


Member Function Documentation

template<class T>
void oh::GraphDataI< T >::get_annotations ( std::vector< std::pair< std::string, std::string > > &  ann  )  const

get annotations

template<class T>
void oh::GraphDataI< T >::get_axis_range ( oh::Axis::ID  axis,
double &  low,
double &  binwidth 
) const

Retrieve a fixed axis partition This function may only be called if axis_type() returns FixedAxis.

Parameters:
axis Must be X, Y or Z.
low Lower edge of the first bin.
width Bin width.

template<class T>
const std::vector<double>& oh::GraphDataI< T >::get_axis_range ( oh::Axis::ID  axis  )  const

Retrieve variable axis partition This function may only be called if axis_type() returns VariableAxis.

Parameters:
axis Must be X, Y or Z.
Returns:
A double std::vector which will be filled with the bin edges.

template<class T>
const std::string& oh::GraphDataI< T >::get_axis_title ( oh::Axis::ID  axis  )  const

Retrieve title of axis

template<class T>
oh::Axis::Kind oh::GraphDataI< T >::get_axis_type ( oh::Axis::ID  axis  )  const

Retrieve axis type

template<class T>
long oh::GraphDataI< T >::get_bin_count ( oh::Axis::ID  axis  )  const

Retrieve the number of bins for the axis

template<class T>
void oh::GraphDataI< T >::get_data ( std::vector< const double * > &  data  )  const

get all the data in arrays first all the points then all the errors

template<class T>
unsigned long oh::GraphDataI< T >::get_entries (  )  const

Retrieve the number of points

template<class T>
T::ErrorStyle oh::GraphDataI< T >::get_error_style (  )  const

get error style

template<class T>
void oh::GraphDataI< T >::get_errors ( std::vector< const double * > &  errorArrays  )  const

Retrieve a vector with all error arrays NO COPIES are made For TGraphErrors we have 2 errors: ex,ey For TGraphAsymmErrors we have 4 errors: exl,exh,eyl,eyh For TGraphBentErrors we have 8 errors: exl,exh,eyl,eyh,exld,exhd,eyld,eyhd For TGraph2DErrors we have 3 errors: ex,ey,ez

template<class T>
const std::vector<long>& oh::GraphDataI< T >::get_indices ( oh::Axis::ID  axis  )  const

Get const reference to the indices of axes labels

template<class T>
const std::vector<std::string>& oh::GraphDataI< T >::get_labels ( oh::Axis::ID  axis  )  const

Get const reference to the labels of the axes

template<class T>
void oh::GraphDataI< T >::get_points ( std::vector< const double * > &  valueArrays  )  const

get all points at once NO COPIES are made

template<class T>
std::string oh::GraphDataI< T >::get_title (  )  const

Get title

template<class T>
std::vector<long>& oh::GraphDataI< T >::indices ( oh::Axis::ID  axis  ) 

Get reference to the indices of axes labels

template<class T>
std::vector<std::string>& oh::GraphDataI< T >::labels ( oh::Axis::ID  axis  ) 

Returns reference to the array of indices of axes labels.

Parameters:
axis Must be X, Y or Z.
Returns:
Refernce to the vector of indices.

template<class T>
void oh::GraphDataI< T >::set_annotations ( const std::vector< std::pair< std::string, std::string > > &  ann  ) 

Set annotations

template<class T>
void oh::GraphDataI< T >::set_axis_range ( oh::Axis::ID  axis,
double  low,
double  binwidth,
unsigned long  nbins 
)

Create a fixed axis partition This function sets axis type to FixedAxis.

Parameters:
axis Must be X, Y or Z.
low Lower edge of the first bin.
width Bin width.
nbins Number of bins.

template<class T>
void oh::GraphDataI< T >::set_axis_range ( oh::Axis::ID  axis,
const double *  edges,
unsigned long  size 
)

Create a variable axis partition This function stores bins range for a particular axis and sets axis type to VariableAxis.

Parameters:
axis Must be X, Y or Z.
edges A double arary of bin edges.
size Size of the bin edges array.

template<class T>
void oh::GraphDataI< T >::set_axis_range ( oh::Axis::ID  axis,
const std::vector< double > &  xbins 
)

Create a variable axis partition This function stores bins range for a particular axis and sets axis type to VariableAxis.

Parameters:
axis Must be X, Y or Z.
xbins A double std::vector of bin edges.

template<class T>
void oh::GraphDataI< T >::set_axis_title ( oh::Axis::ID  axis,
const std::string &  label 
)

Update title of axis

template<class T>
void oh::GraphDataI< T >::set_error_style ( typename T::ErrorStyle  es  ) 

Set error style

template<class T>
void oh::GraphDataI< T >::set_errors ( const std::vector< const double * > &  errorArrays  ) 

set all the errors, COPIES of the double arrays are made

template<class T>
void oh::GraphDataI< T >::set_points ( const std::vector< const double * > &  valueArrays  ) 

set all points at once, COPIES of the arrays are made The vector must provide 2 arrays for normal graphs and 3 arrays for Graph2D graphs

template<class T>
void oh::GraphDataI< T >::set_title ( const std::string &  t  ) 

Set title


The documentation for this class was generated from the following file:
Generated on Thu Dec 21 16:26:03 2006 for OH User API by  doxygen 1.4.7