#ifndef NEIGH_H
#define NEIGH_H

#include <stdarg.h>

class neigh
{
 private:
  int *len;
  int *nfield;
  int dirstep(int dir);
  static int ipow(const int& x, const int& p){
    if (p == 0) return 1;
    if (p == 1) return x;
    return x * ipow(x, p-1);
  }
 public:
  neigh(const int& dimension, ...);
  int& operator[] (int i) {return nfield[i];}
};

#endif
