inlib
1.2.0
|
Public Member Functions | |
virtual plottable * | copy () const |
virtual bool | is_valid () const |
virtual std::string | name () |
virtual void | set_name (const std::string &a_s) |
virtual std::string | title () |
virtual std::string | legend () |
virtual void | set_legend (const std::string &a_s) |
virtual std::string | infos (const std::string &a_opts) |
virtual float | x_axis_min () const |
virtual float | x_axis_max () const |
virtual float | y_axis_min () const |
virtual float | y_axis_max () const |
virtual unsigned int | points () const |
virtual bool | ith_point (unsigned int a_index, float &a_x, float &a_y) const |
c2d2plot (const histo::c2d &a_data) | |
virtual | ~c2d2plot () |
Protected Member Functions | |
c2d2plot (const c2d2plot &a_from) |
Definition at line 17 of file cloud2plot.
inlib::sg::c2d2plot::c2d2plot | ( | const histo::c2d & | a_data | ) | [inline] |
Definition at line 81 of file cloud2plot.
:m_data(a_data) {}
virtual inlib::sg::c2d2plot::~c2d2plot | ( | ) | [inline, virtual] |
Definition at line 84 of file cloud2plot.
{}
inlib::sg::c2d2plot::c2d2plot | ( | const c2d2plot & | a_from | ) | [inline, protected] |
Definition at line 86 of file cloud2plot.
:inlib::sg::plottable(a_from) ,inlib::sg::points2D(a_from) ,m_data(a_from.m_data) ,m_name(a_from.m_name) ,m_legend(a_from.m_legend) {}
virtual plottable* inlib::sg::c2d2plot::copy | ( | ) | const [inline, virtual] |
Implements inlib::sg::plottable.
Definition at line 19 of file cloud2plot.
{return new c2d2plot(*this);}
virtual std::string inlib::sg::c2d2plot::infos | ( | const std::string & | a_opts | ) | [inline, virtual] |
Implements inlib::sg::plottable.
Definition at line 27 of file cloud2plot.
{ std::string f_lf("\n"); std::string sinfos; std::vector<std::string> words; inlib::words(a_opts," ",false,words); std::vector<std::string>::const_iterator it; for(it=words.begin();it!=words.end();++it) { if(((*it)=="name") && m_name.size()) { if(sinfos.size()) sinfos += f_lf; sinfos += "Name\n"; sinfos += m_name; } else if((*it)=="entries") { if(sinfos.size()) sinfos += f_lf; sinfos += "Entries\n"; sinfos += inlib::to<int>(m_data.entries()); } else if((*it)=="mean") { if(sinfos.size()) sinfos += f_lf; sinfos += "MeanX\n"; sinfos += inlib::to<double>(m_data.mean_x()); sinfos += f_lf; sinfos += "MeanY\n"; sinfos += inlib::to<double>(m_data.mean_y()); } else if((*it)=="rms") { if(sinfos.size()) sinfos += f_lf; sinfos += "RMS X\n"; sinfos += inlib::to<double>(m_data.rms_x()); sinfos += f_lf; sinfos += "RMS Y\n"; sinfos += inlib::to<double>(m_data.rms_y()); } } return sinfos; }
virtual bool inlib::sg::c2d2plot::is_valid | ( | ) | const [inline, virtual] |
virtual bool inlib::sg::c2d2plot::ith_point | ( | unsigned int | a_index, |
float & | a_x, | ||
float & | a_y | ||
) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 73 of file cloud2plot.
{ if(a_index>=m_data.entries()) {a_x = 0;a_y = 0;return false;} if(a_index>=m_data.entries()) {a_x = 0;a_y = 0;return false;} a_x = m_data.value_x(a_index); a_y = m_data.value_y(a_index); return true; }
virtual std::string inlib::sg::c2d2plot::legend | ( | ) | [inline, virtual] |
virtual std::string inlib::sg::c2d2plot::name | ( | ) | [inline, virtual] |
virtual unsigned int inlib::sg::c2d2plot::points | ( | ) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 72 of file cloud2plot.
{return m_data.entries();}
virtual void inlib::sg::c2d2plot::set_legend | ( | const std::string & | a_s | ) | [inline, virtual] |
virtual void inlib::sg::c2d2plot::set_name | ( | const std::string & | a_s | ) | [inline, virtual] |
virtual std::string inlib::sg::c2d2plot::title | ( | ) | [inline, virtual] |
virtual float inlib::sg::c2d2plot::x_axis_max | ( | ) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 68 of file cloud2plot.
{return m_data.upper_edge_x();}
virtual float inlib::sg::c2d2plot::x_axis_min | ( | ) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 67 of file cloud2plot.
{return m_data.lower_edge_x();}
virtual float inlib::sg::c2d2plot::y_axis_max | ( | ) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 70 of file cloud2plot.
{return m_data.upper_edge_y();}
virtual float inlib::sg::c2d2plot::y_axis_min | ( | ) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 69 of file cloud2plot.
{return m_data.lower_edge_y();}