Created
March 5, 2019 21:16
-
-
Save Ben1980/002aa6ec730eee7bc0b20de9d5cee158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solver { | |
public: | |
explicit Solver(double mEpsilon); | |
std::vector<Particle> solve(const std::vector<Particle> &particles) const; | |
private: | |
std::vector<Particle> calculateAcceleration(const std::vector<Particle> &particles) const; | |
std::vector<Particle> calculateVelocity(const std::vector<Particle> &particles) const; | |
std::vector<Particle> calculatePosition(const std::vector<Particle> &particles) const; | |
static Particle AccumulateAcceleration(const std::vector<Particle> &particles, const Particle &particle); | |
static double CalculateEquivalentMass(const Particle &particleA, const Particle &particleB); | |
static const double G; | |
static const double EPSILON; | |
double mEpsilon; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment