|
inlib
1.2.0
|


Public Types | |
| typedef std::vector< T > | data_t |
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 |
| xy2plot (const data_t &a_x, const data_t &a_y) | |
| virtual | ~xy2plot () |
Protected Member Functions | |
| xy2plot (const xy2plot &a_from) | |
| typedef std::vector<T> inlib::sg::xy2plot< T >::data_t |
| inlib::sg::xy2plot< T >::xy2plot | ( | const data_t & | a_x, |
| const data_t & | a_y | ||
| ) | [inline] |
| virtual inlib::sg::xy2plot< T >::~xy2plot | ( | ) | [inline, virtual] |
| inlib::sg::xy2plot< T >::xy2plot | ( | const xy2plot< T > & | a_from | ) | [inline, protected] |
| virtual plottable* inlib::sg::xy2plot< T >::copy | ( | ) | const [inline, virtual] |
Implements inlib::sg::plottable.
Definition at line 20 of file vec2plot.
{return new xy2plot(*this);}
| virtual std::string inlib::sg::xy2plot< T >::infos | ( | const std::string & | a_opts | ) | [inline, virtual] |
Implements inlib::sg::plottable.
Definition at line 28 of file vec2plot.
{
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>
(inlib::mn<unsigned int>(m_x.size(),m_y.size()));
}
}
return sinfos;
}
| virtual bool inlib::sg::xy2plot< T >::is_valid | ( | ) | const [inline, virtual] |
| virtual bool inlib::sg::xy2plot< T >::ith_point | ( | unsigned int | a_index, |
| float & | a_x, | ||
| float & | a_y | ||
| ) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 61 of file vec2plot.
{
if(a_index>=m_x.size()) {a_x = T();a_y = T();return false;}
if(a_index>=m_y.size()) {a_x = T();a_y = T();return false;}
a_x = m_x[a_index];
a_y = m_y[a_index];
return true;
}
| virtual std::string inlib::sg::xy2plot< T >::legend | ( | ) | [inline, virtual] |
| virtual std::string inlib::sg::xy2plot< T >::name | ( | ) | [inline, virtual] |
| virtual unsigned int inlib::sg::xy2plot< T >::points | ( | ) | const [inline, virtual] |
Implements inlib::sg::points2D.
Definition at line 58 of file vec2plot.
{
return inlib::mn<unsigned int>(m_x.size(),m_y.size());
}
| virtual void inlib::sg::xy2plot< T >::set_legend | ( | const std::string & | a_s | ) | [inline, virtual] |
| virtual void inlib::sg::xy2plot< T >::set_name | ( | const std::string & | a_s | ) | [inline, virtual] |
| virtual std::string inlib::sg::xy2plot< T >::title | ( | ) | [inline, virtual] |
| virtual float inlib::sg::xy2plot< T >::x_axis_max | ( | ) | const [inline, virtual] |
| virtual float inlib::sg::xy2plot< T >::x_axis_min | ( | ) | const [inline, virtual] |
| virtual float inlib::sg::xy2plot< T >::y_axis_max | ( | ) | const [inline, virtual] |
| virtual float inlib::sg::xy2plot< T >::y_axis_min | ( | ) | const [inline, virtual] |
1.7.5.1