tnt_fortran_array3d.h Source File

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

# tnt_fortran_array3d.h

Go to the documentation of this file.

    00001 /*
    00002 *
    00003 * Template Numerical Toolkit (TNT): Three-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_ARRAY3D_H
    00023 #define TNT_FORTRAN_ARRAY3D_H
    00024
    00025 #include <cstdlib>
    00026 #include <iostream>
    00027 #ifdef TNT_BOUNDS_CHECK
    00028 #include <assert.h>
    00029 #endif
    00030 #include "tnt_array3d.h"
    00031
    00032 namespace TNT
    00033 {
    00034
    00060 template <class T>
    00061 class Fortran_Array3D
    00062 {
    00063
    00064
    00065   private:
    00066
    00067
    00068
    00069   public:
    00070
    00071     typedef         T   value_type;
    00072
    00073                Fortran_Array3D();
    00074                Fortran_Array3D(int m, int n, int k);
    00075                Fortran_Array3D(int m, int n, int k,  T *a);
    00076                Fortran_Array3D(int m, int n, int k, const T &a);
    00077     inline Fortran_Array3D(const Fortran_Array3D &A);
    00078         inline Fortran_Array3D & operator=(const T &a);
    00079         inline Fortran_Array3D & operator=(const Fortran_Array3D &A);
    00080         inline Fortran_Array3D & ref(const Fortran_Array3D &A);
    00081                Fortran_Array3D copy() const;
    00082                    Fortran_Array3D & inject(const Fortran_Array3D & A);
    00083         inline T& operator()(int i, int j, int k);
    00084         inline const T& operator()(int i, int j, int k) const ;
    00085         inline int dim1() const;
    00086         inline int dim2() const;
    00087         inline int dim3() const;
    00088         inline int ref_count() const;
    00089                ~Fortran_Array3D();
    00090
    00091
    00092 };
    00093
    00097 template <class T>
    00098 Fortran_Array3D<T>::Fortran_Array3D();
    00099
    00100
    00107 template <class T>
    00108 Fortran_Array3D<T>::Fortran_Array3D(const Fortran_Array3D<T> &A);
    00109
    00110
    00111
    00124 template <class T>
    00125 Fortran_Array3D<T>::Fortran_Array3D(int m, int n, int k);
    00126
    00127
    00128
    00139 template <class T>
    00140 Fortran_Array3D<T>::Fortran_Array3D(int m, int n, int k, const T &val) ;
    00141
    00142
    00156 template <class T>
    00157 Fortran_Array3D<T>::Fortran_Array3D(int m, int n, int k, T *a)  ;
    00158
    00159
    00160
    00161
    00169 template <class T>
    00170 inline T& Fortran_Array3D<T>::operator()(int i, int j, int k) ;
    00171
    00179 template <class T>
    00180 inline const T& Fortran_Array3D<T>::operator()(int i, int j, int k)  const;
    00181
    00182
    00186 template <class T>
    00187 Fortran_Array3D<T> & Fortran_Array3D<T>::operator=(const T &a);
    00188
    00189
    00196 template <class T>
    00197 Fortran_Array3D<T> Fortran_Array3D<T>::copy() const;
    00198
    00222 template <class T>
    00223 Fortran_Array3D<T> & Fortran_Array3D<T>::inject(const Fortran_Array3D &A);
    00224
    00225
    00226
    00227
    00228
    00239 template <class T>
    00240 Fortran_Array3D<T> & Fortran_Array3D<T>::ref(const Fortran_Array3D<T> &A);
    00241
    00245 template <class T>
    00246 Fortran_Array3D<T> & Fortran_Array3D<T>::operator=(const Fortran_Array3D<T> &A);
    00247
    00251 template <class T>
    00252 inline int Fortran_Array3D<T>::dim1() const;
    00253
    00257 template <class T>
    00258 inline int Fortran_Array3D<T>::dim2() const ;
    00259
    00263 template <class T>
    00264 inline int Fortran_Array3D<T>::dim3() const ;
    00265
    00266
    00271 template <class T>
    00272 inline int Fortran_Array3D<T>::ref_count() const;
    00273
    00274 template <class T>
    00275 Fortran_Array3D<T>::~Fortran_Array3D();
    00276
    00277
    00278 } /* namespace TNT */
    00279
    00280 #endif
    00281 /* TNT_FORTRAN_ARRAY3D_H */
    00282