Changeset 182
- Timestamp:
- Feb 16, 2006, 8:38:05 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mesh/grid1d_reg.h
r176 r182 7 7 // 8 8 // 9 10 9 #include <vector> 11 #include " rp_defs.h"10 #include "util.h" 12 11 13 12 class RpGrid1d_reg { … … 15 14 // constructors 16 15 RpGrid1d_reg() : 17 _npoints(0),18 _start(0.0),19 _delta(0.0)16 m_npoints(0), 17 m_start(0.0), 18 m_delta(0.0) 20 19 { }; 21 20 22 21 // does not expand to array 23 22 RpGrid1d_reg(int npts, double delta, double st) : 24 _npoints(npts),25 _start(st),26 _delta(delta)23 m_npoints(npts), 24 m_start(st), 25 m_delta(delta) 27 26 { }; 28 27 29 28 RpGrid1d_reg(int npts, double delta): 30 _npoints(npts),31 _start(0.0),32 _delta(delta)29 m_npoints(npts), 30 m_start(0.0), 31 m_delta(delta) 33 32 { }; 34 33 … … 36 35 //RpGrid1d_reg(const RpGrid1d_reg& c); 37 36 38 double delta() { return _delta; };39 void delta(double d) { _delta = d; };40 double start() { return _start; };41 void start(double s) { _start = s; };42 int points() { return _npoints; };43 void points(int n) { _npoints = n; };37 double delta() { return m_delta; }; 38 void delta(double d) { m_delta = d; }; 39 double start() { return m_start; }; 40 void start(double s) { m_start = s; }; 41 int points() { return m_npoints; }; 42 void points(int n) { m_npoints = n; }; 44 43 45 44 // construct the object with byte stream containing number of points and delta value … … 47 46 48 47 // return number of points in grid 49 int npoints() { return _npoints; }48 int npoints() { return m_npoints; } 50 49 51 50 // serialize object … … 64 63 65 64 private: 66 int _npoints;67 double _start;68 double _delta;69 vector<double> _data;65 int m_npoints; 66 double m_start; 67 double m_delta; 68 vector<double> m_data; 70 69 }; 71 70
Note: See TracChangeset
for help on using the changeset viewer.