#include "datastructures/BarnesHutTree.hpp"
#include <iostream>

using namespace nbody;
using namespace std;

int main(int argc, char* argv[]) {
	BarnesHutTree tree;

	if (argc == 2) {
		vector<Body> bodies = Tree::dubinskiParse(argv[1]);

		cout << bodies.size() << endl;
		tree.build(bodies);
		if (tree.isCorrect()) {
			cout << "Tree correct" << endl;
		} else {
			cout << "Tree not correct" << endl;
		}
	} else {
		std::cout << "You need to specify the body input file." << endl;
	}
	return 0;
}
