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

mdp_nvector_field.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00014 class mdp_nvector_field: public mdp_field<mdp_complex> {
00015 public:
00016   uint rows, columns, imax, imax2;
00017   mdp_nvector_field() {
00018     rows=columns=imax=imax2=0;
00019     mdp_field<mdp_complex>::reset_field();
00020   }
00021   mdp_nvector_field(mdp_nvector_field &field) {
00022     rows=field.rows;
00023     columns=field.columns;
00024     imax=field.imax;
00025     imax2=field.imax2;
00026     allocate_field(field.lattice(),field.imax);
00027   }
00028   mdp_nvector_field(mdp_lattice &a, int n, int i) {
00029     rows=i;
00030     columns=1;
00031     imax=i*n;
00032     imax2=i;
00033     allocate_field(a,imax);
00034   }
00035   void allocate_mdp_nvector_field(mdp_lattice &a, int n, int i) {
00036     deallocate_field();
00037     rows=i;
00038     columns=1;
00039     imax=i*n;
00040     imax2=i;
00041     allocate_field(a,imax);
00042   }
00043   mdp_matrix operator() (mdp_site x,int n) {
00044     return mdp_matrix(address(x,n*imax2),rows,columns);
00045   }
00046   mdp_complex & operator() (mdp_site x, int n, int i) {
00047     return address(x,n*imax2)[i];
00048   }
00049   const mdp_complex & operator() (mdp_site x, int n, int i) const {
00050     return address(x,n*imax2)[i];
00051   }
00052 };
00053 
00054 

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