//-----------------------------------------------// // This file defines the lattice. Implemented at // // the time are the set and get orientation // // of a spin defined in Spin.hpp // // // // Thomas Bisig (03.2005), thomas@macapp.net // //-----------------------------------------------// #ifndef LATTICE_HPP #define LATTICE_HPP #include "Spin.hpp" class Lattice { public: Lattice(int n); Spin * mySpin; int getOrientation(int n); void setOrientation(int n, int m); private: int dim; }; Lattice::Lattice(int n) { dim = n; mySpin = new Spin; Spin myArray[dim]; mySpin = myArray; } int Lattice::getOrientation(int n) { return mySpin[n].readDirection(); } void Lattice::setOrientation(int n, int m) { mySpin[n].changeDirection(m); } #endif