Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

tnt_fortran_array2d.h

Go to the documentation of this file.
00001 /*
00002 *
00003 * Template Numerical Toolkit (TNT): Two-dimensional Fortran numerical array
00004 *
00005 * Mathematical and Computational Sciences Division
00006 * National Institute of Technology,
00007 * Gaithersburg, MD USA
00008 *
00009 *
00010 * This software was developed at the National Institute of Standards and
00011 * Technology (NIST) by employees of the Federal Government in the course
00012 * of their official duties. Pursuant to title 17 Section 105 of the
00013 * United States Code, this software is not subject to copyright protection
00014 * and is in the public domain. NIST assumes no responsibility whatsoever for
00015 * its use by other parties, and makes no guarantees, expressed or implied,
00016 * about its quality, reliability, or any other characteristic.
00017 *
00018 */
00019 
00020 
00021 
00022 #ifndef TNT_FORTRAN_ARRAY2D_H
00023 #define TNT_FORTRAN_ARRAY2D_H
00024 
00025 #include <cstdlib>
00026 #include <iostream>
00027 
00028 #ifdef TNT_BOUNDS_CHECK
00029 #include <assert.h>
00030 #endif
00031 
00032 #include "tnt_array2d.h"
00033 
00034 namespace TNT
00035 {
00036 
00062 template <class T>
00063 class Fortran_Array2D 
00064 {
00065 
00066 
00067 
00068   public:
00069 
00070     typedef         T   value_type;
00071 
00072                Fortran_Array2D();
00073                Fortran_Array2D(int m, int n);
00074                Fortran_Array2D(int m, int n,  T *a);
00075                Fortran_Array2D(int m, int n, const T &a);
00076     inline Fortran_Array2D(const Fortran_Array2D &A);
00077         inline Fortran_Array2D & operator=(const T &a);
00078         inline Fortran_Array2D & operator=(const Fortran_Array2D &A);
00079         inline Fortran_Array2D & ref(const Fortran_Array2D &A);
00080                Fortran_Array2D copy() const;
00081                    Fortran_Array2D & inject(const Fortran_Array2D & A);
00082         inline T& operator()(int i, int j);
00083         inline const T& operator()(int i, int j) const ;
00084         inline int dim1() const;
00085         inline int dim2() const;
00086         inline int ref_count() const;
00087                ~Fortran_Array2D();
00088 
00089 
00090 };
00091 
00095 template <class T>
00096 Fortran_Array2D<T>::Fortran_Array2D();
00097 
00098 
00105 template <class T>
00106 Fortran_Array2D<T>::Fortran_Array2D(const Fortran_Array2D<T> &A);
00107 
00108 
00109 
00121 template <class T>
00122 Fortran_Array2D<T>::Fortran_Array2D(int m, int n);
00123 
00124 
00125 
00135 template <class T>
00136 Fortran_Array2D<T>::Fortran_Array2D(int m, int n, const T &val);
00137 
00138 
00153 template <class T>
00154 Fortran_Array2D<T>::Fortran_Array2D(int m, int n, T *a);
00155 
00156 
00157 
00158 
00166 template <class T>
00167 inline T& Fortran_Array2D<T>::operator()(int i, int j) ;
00168 
00176 template <class T>
00177 inline const T& Fortran_Array2D<T>::operator()(int i, int j)  const;
00178 
00179 
00183 template <class T>
00184 Fortran_Array2D<T> & Fortran_Array2D<T>::operator=(const T &a);
00185 
00186 
00193 template <class T>
00194 Fortran_Array2D<T> Fortran_Array2D<T>::copy() const;
00195 
00196 
00220 template <class T>
00221 Fortran_Array2D<T> & Fortran_Array2D<T>::inject(const Fortran_Array2D &A);
00222 
00223 
00224 
00225 
00226 
00237 template <class T>
00238 Fortran_Array2D<T> & Fortran_Array2D<T>::ref(const Fortran_Array2D<T> &A);
00239 
00243 template <class T>
00244 Fortran_Array2D<T> & Fortran_Array2D<T>::operator=(const Fortran_Array2D<T> &A);
00245 
00249 template <class T>
00250 inline int Fortran_Array2D<T>::dim1() const ;
00251 
00255 template <class T>
00256 inline int Fortran_Array2D<T>::dim2() const ;
00257 
00258 
00259 
00264 template <class T>
00265 inline int Fortran_Array2D<T>::ref_count() ;
00266 
00267 template <class T>
00268 Fortran_Array2D<T>::~Fortran_Array2D();
00269 
00270 
00271 
00272 
00273 } /* namespace TNT */
00274 
00275 #endif
00276 /* TNT_FORTRAN_ARRAY2D_H */
00277 

Generated at Thu Jun 26 17:26:14 2003 for Template Numerical Toolkit (TNT) by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001