![]() |
Home | Libraries | License | Support | People | ALPS Web Site |
alps::plot::Point — a class to store a single point in the plot
// In header: <alps/plot.h> template<typename C> class Point { public: // types typedef C value_type; // the type for a coordinate typedef std::vector< C >::size_type size_type; // the type to store the number of coordinates // construct/copy/destruct Point(); Point(C, C); // public member functions size_type size() const; const C & operator[](int) const; void push_back(C); void clear(); void output(oxstream &, SetType) const; };
Point
public member functionssize_type size() const;The number of values stored.
Error bars in the x and y direction will be stored as additional coordinates, such that the size of a Point with error bars in both directions will be 4 and with error bars in only x or y direction will be 3.
const C & operator[](int i) const;returns the i -th coordinate.
The mapping from coordinate number to meaning is specified by the values of the enum SetType
but not stored in each point. For eaxmple a SetType
of xdxy
means that
index 0 is the x-coordinate
index 1 is the error on the x-coordinate
index 2 is the y-coordinate
void push_back(C data);adds another value to the point.
void clear();clears the contents, erasing all values
void output(oxstream & out, SetType type) const;
outputs the Point in XML format, where the mapping to tags is specified by the SetType
. E.g. a SetType
of xdxy
means that
the first value will be printed as contents of an <x> tag
the second value will be printed as contents of a <dx> tag
the third value will be printed as contents of a <y> tag
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo |