]> git.treefish.org Git - phys/latlib.git/blob - neigh.h
...
[phys/latlib.git] / neigh.h
1 #ifndef NEIGH_H
2 #define NEIGH_H
3
4 class neigh
5 {
6  private:
7   int *nfield;
8   static int ipow(const int& x, const int& p){
9     if (p == 0) return 1;
10     if (p == 1) return x;
11     return x * ipow(x, p-1);
12   }
13  public:
14   neigh(const int& length, const int& dimension);
15   int& operator[] (int i) {return nfield[i];}
16 };
17
18 #endif