add_library(lat_writeout writeout.cpp)
+add_library(lat_paraq paraq.cpp)
+
add_executable(neigh_test neigh_test.cpp)
target_link_libraries(neigh_test lat_neigh)
\ No newline at end of file
--- /dev/null
+#include "paraq.h"
+
+paraq::paraq(int _nprocs, const int _rank)
+{
+ lastjob = -1;
+ nprocs = _nprocs;
+ rank = _rank;
+}
+
+void paraq::addRange(const string& paraid, double min, double max, double step)
+{
+ double *range = new double[3];
+ range[0] = min;
+ range[1] = max;
+ range[2] = step;
+
+ paraMap[paraid].push_back( range );
+}
+
+map<string,double>* paraq::nextParas()
+{
+ if( lastjob == -1 ) {
+ lastjob = 0;
+
+ for( map< string, vector< double* > >::iterator paraIt = paraMap.begin(); paraIt != paraMap.end(); ++paraIt ) {
+ for( vector< map<string,double> >::iterator jobIt = jobList.begin(); jobIt != jobList.end(); ++jobIt) {
+ for( vector<double*>::iterator rangeIt = paraIt->second.begin(); rangeIt != paraIt->second.end(); ++rangeIt ) {
+
+ for( double paraval = *rangeIt[0]; paraval < *rangeIt[1]; paraval += *rangeIt[2] ) {
+
+ //if( paraval == *rangeIt[0] )
+ //else
+
+ }
+
+ }
+
+ }
+ }
+ }
+}
--- /dev/null
+#ifndef PARAQ_H
+#define PARAQ_H
+
+#include <string>
+#include <map>
+#include <vector>
+
+using namespace std;
+
+class paraq {
+ public:
+ paraq(int nprocs, int rank);
+ void addRange(const string& paraid, double min, double max, double step);
+ map<string,double>* nextParas();
+
+ private:
+ int nprocs, rank;
+ int lastjob;
+ map< string, vector< double* > > paraMap;
+ vector< map<string,double> > jobList;
+};
+
+#endif