ViennaGrid for Python
 All Classes Files Functions Variables
polar.hpp
Go to the documentation of this file.
1 
6 #ifndef POINTS_POLAR_HPP
7 #define POINTS_POLAR_HPP
8 
9 #include "types.hpp"
10 #include "forward.hpp"
11 
12 #include <boost/python.hpp>
13 using namespace boost::python;
14 
20 class PointPolar2D {
26  PointPolar_t *point;
27 
36  int id; // TODO: move to vertex
37 public:
48  PointPolar2D();
49 
60  PointPolar2D(double x, double y);
61 
78  PointPolar2D(PointPolar_t *initial_point, unsigned int initial_id=0);
79 
93  PointPolar2D(PointPolar_t &initial_point, unsigned int initial_id=-1);
94 
100  size_t get_dimension();
101 
107  const char * get_coord_system();
108 
114  double get_coord(unsigned int index);
115 
121  void set_coord(unsigned int index, double new_value);
122 
128  list get_coord_list();
129 
136  PointPolar2D & operator=(const PointPolar2D &other);
137 
143  PointPolar2D operator+(const PointPolar2D &other);
144 
150  PointPolar2D operator-(const PointPolar2D &other);
151 
157  PointPolar2D operator*(const double factor);
158 
164  PointPolar2D operator/(const double factor);
165 
171  PointPolar2D operator-();
172 
178  PointPolar_t & get_point();
179 
185  unsigned int get_id();
186 
192  void set_id(unsigned int new_id);
193 
199  PointCartesian2D to_cartesian();
200 
206  double norm_1();
207 
213  double norm_2();
214 
220  double norm_inf();
221 };
222 
223 #endif /* end of include guard: POINTS_POLAR_HPP */