Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

mdp_nmatrix_field.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00025 class mdp_nmatrix_field: public mdp_field<mdp_complex> {
00026 public:
00027   uint rows, columns, matrices, imax, imax2;
00028   mdp_nmatrix_field() {
00029     rows=columns=matrices=imax=imax2=0;
00030     mdp_field<mdp_complex>::reset_field();
00031   }
00032   mdp_nmatrix_field(mdp_nmatrix_field &field) {
00033     mdp_field<mdp_complex>::reset_field();
00034     rows=field.rows;
00035     columns=field.columns;
00036     matrices=field.matrices;
00037     imax=field.imax;
00038     imax2=field.imax2;
00039     allocate_field(field.lattice(),field.imax);
00040   }
00042   mdp_nmatrix_field(mdp_lattice &a, int n, int i, int j) {
00043     mdp_field<mdp_complex>::reset_field();
00044     rows=i;
00045     columns=j;
00046     matrices=n;
00047     imax=i*j*n;
00048     imax2=i*j;
00049     allocate_field(a,imax);
00050   }
00052   void allocate_mdp_nmatrix_field(mdp_lattice &a, int n, int i, int j) {
00053     deallocate_field();
00054     rows=i;
00055     columns=j;
00056     matrices=n;
00057     imax=i*j*n;
00058     imax2=i*j;
00059     allocate_field(a,imax);
00060   }  
00062   mdp_matrix operator() (mdp_site x, int n) {
00063     return mdp_matrix(address(x,n*imax2),rows,columns);
00064   }
00066   mdp_complex& operator() (mdp_site x, int n, int i, int j) {
00067     return address(x,n*imax2)[i*columns+j];
00068   }
00069   const mdp_complex& operator() (mdp_site x, int n, int i, int j) const {
00070     return address(x,n*imax2)[i*columns+j];
00071   }
00072 };

Generated on Sun Feb 27 15:12:21 2005 by  doxygen 1.4.1