// index2.h
//
// Jiangguo (James) Liu
// ColoState, Jan.-Jun. 2007


#ifndef Index2_H
#define Index2_H

#include <iostream>


// Index for 2-dim problems 

class Index2 {
private:
   int ix, iy;
public: 
   Index2(int i1=0, int i2=0) {ix=i1; iy=i2;}  // Default constructor
   Index2(const Index2 &ind) {ix=ind.ix; iy=ind.iy;}  // Copy constructor
   Index2 &operator=(const Index2&);  // Copy assignment
friend bool operator<=(const Index2&, const Index2&);
friend int lindex(const Index2 &ind, const Index2 &MaxInd);
friend std::ostream &operator<<(std::ostream&strm, const Index2&);
};

#endif  // Index2_H
