00001
00022 #ifndef TOOLS_H
00023 #define TOOLS_H
00024
00025 #include "define.h"
00026 #include <iostream>
00027 #include <sstream>
00028 #include <fstream>
00029 #include <cstring>
00030 #include <limits>
00031 #include <assert.h>
00032
00033
00044 bool loadPosVelFromFile(std::string filename, int &N, FLOAT_ARRAY_TYPE *pos, FLOAT_ARRAY_TYPE *vel);
00045
00046
00059 bool loadInitData(std::string filename, FLOAT_ARRAY_TYPE *pos, FLOAT_ARRAY_TYPE *vel, int* cnn, int &N, int &numNN);
00060
00061
00075 bool writeData(std::string &basename, FLOAT_ARRAY_TYPE *pos, FLOAT_ARRAY_TYPE *vel, int *cnn, int &N, int &numNN, int timestamp);
00076
00077 #endif //TOOLS_H