- Timestamp:
- Apr 9, 2013, 8:44:51 PM (13 years ago)
- Children:
- 6e10f33
- Parents:
- 866ac4
- Location:
- src/units/particle
- Files:
-
- 1 added
- 1 edited
-
particle.cpp (added)
-
particle.hpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/units/particle/particle.hpp
r866ac4 rb3075a 28 28 #ifndef PARTICLE_HPP_ 29 29 #define PARTICLE_HPP_ 30 31 #include <sstream> 32 #include <string> 30 33 31 34 #include "base/vector.hpp" … … 113 116 } 114 117 118 std::string ToString() const 119 { 120 std::stringstream str; 121 122 str << "VMG::Particle::Particle {" << std::endl 123 << " Pos: " << x_ << std::endl 124 << " Charge: " << q_ << std::endl 125 << " Potential: " << p_ << std::endl 126 << " Field: " << f_ << std::endl 127 << "}"; 128 129 return str.str(); 130 } 131 115 132 private: 116 133 Vector x_, f_; … … 120 137 }; 121 138 139 std::ostream& operator<<(std::ostream& out, const VMG::Particle::Particle& particle); 140 122 141 } 123 142
Note:
See TracChangeset
for help on using the changeset viewer.
