Newer
Older
#include <string>
#include <sstream>
}
Tree::~Tree() {
}
void Tree::clean() {
while (current != this->nodes) {
if (!current->isCorrect()) {
return false;
}
current = current->next;
}
return true;
unsigned long Tree::numberOfNodes() {
unsigned long nodes = 0;
for (Node* node = this->nodes->next; node != this->nodes; node = node->next) {
vector<Body> Tree::dubinskiParse(string filename) {
vector<Body> result;
string line;
ifstream infile(filename.c_str(), ifstream::in);
double mass, px, py, pz, vx, vy, vz;
while (infile >> mass >> px >> py >> pz >> vx >> vy >> vz) {
Body b(px, py, pz, vx, vy, vz, mass);
result.push_back(b);
}