Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

matrix_i.h

00001 //
00002 // matrix_i.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifndef _math_scmat_matrix_i_h
00029 #define _math_scmat_matrix_i_h
00030 #ifdef __GNUC__
00031 #pragma interface
00032 #endif
00033 
00034 #include <math/scmat/matrix.h>
00035 
00036 // These are the inline candidates for the members defined in matrix.h.
00037 
00038 #ifdef INLINE_FUNCTIONS
00039 #define INLINE inline
00040 #else
00041 #define INLINE
00042 #endif
00043 
00044 // /////////////////////////////////////////////////////////////////////////
00045 // SCMatrixdouble inline candidates
00046 
00047 INLINE
00048 SCMatrixdouble::SCMatrixdouble(SCMatrix*a,int b,int c):
00049   matrix(a),i(b),j(c)
00050 {
00051 }
00052 INLINE
00053 SCMatrixdouble::~SCMatrixdouble()
00054 {
00055 }
00056 INLINE double
00057 SCMatrixdouble::operator=(double a)
00058 {
00059   matrix.set_element(i,j,a);
00060   return a;
00061 }
00062 INLINE double
00063 SCMatrixdouble::operator=(const SCMatrixdouble& md)
00064 {
00065   double a = md.val();
00066   matrix.set_element(i,j,a);
00067   return a;
00068 }
00069 INLINE
00070 SCMatrixdouble::operator double()
00071 {
00072   return matrix.get_element(i,j);
00073 }
00074 INLINE double
00075 SCMatrixdouble::val() const
00076 {
00077   return matrix.get_element(i,j);
00078 }
00079 
00080 // /////////////////////////////////////////////////////////////////////////
00081 // SymmSCMatrixdouble inline candidates
00082 
00083 INLINE
00084 SymmSCMatrixdouble::SymmSCMatrixdouble(SymmSCMatrix*a,int b,int c):
00085   matrix(a),i(b),j(c)
00086 {
00087 }
00088 INLINE
00089 SymmSCMatrixdouble::~SymmSCMatrixdouble()
00090 {
00091 }
00092 INLINE double
00093 SymmSCMatrixdouble::operator=(double a)
00094 {
00095   matrix.set_element(i,j,a);
00096   return a;
00097 }
00098 INLINE double
00099 SymmSCMatrixdouble::operator=(const SymmSCMatrixdouble& md)
00100 {
00101   double a = md.val();
00102   matrix.set_element(i,j,a);
00103   return a;
00104 }
00105 INLINE
00106 SymmSCMatrixdouble::operator double()
00107 {
00108   return matrix.get_element(i,j);
00109 }
00110 INLINE double
00111 SymmSCMatrixdouble::val() const
00112 {
00113   return matrix.get_element(i,j);
00114 }
00115 
00116 // /////////////////////////////////////////////////////////////////////////
00117 // DiagSCMatrixdouble inline candidates
00118 
00119 INLINE
00120 DiagSCMatrixdouble::DiagSCMatrixdouble(DiagSCMatrix*a,int b,int c):
00121   matrix(a),i(b),j(c)
00122 {
00123 }
00124 INLINE
00125 DiagSCMatrixdouble::~DiagSCMatrixdouble()
00126 {
00127 }
00128 INLINE double
00129 DiagSCMatrixdouble::operator=(double a)
00130 {
00131   matrix.set_element(i,a);
00132   return a;
00133 }
00134 INLINE double
00135 DiagSCMatrixdouble::operator=(const DiagSCMatrixdouble& md)
00136 {
00137   double a = md.val();
00138   matrix.set_element(i,a);
00139   return a;
00140 }
00141 INLINE
00142 DiagSCMatrixdouble::operator double()
00143 {
00144   return matrix.get_element(i);
00145 }
00146 INLINE double
00147 DiagSCMatrixdouble::val() const
00148 {
00149   return matrix.get_element(i);
00150 }
00151 
00152 // /////////////////////////////////////////////////////////////////////////
00153 // SCVectordouble inline candidates
00154 
00155 INLINE
00156 SCVectordouble::SCVectordouble(SCVector*a,int b):
00157   vector(a),i(b)
00158 {
00159 }
00160 INLINE
00161 SCVectordouble::~SCVectordouble()
00162 {
00163 }
00164 INLINE double
00165 SCVectordouble::operator=(double a)
00166 {
00167   vector.set_element(i,a);
00168   return a;
00169 }
00170 INLINE double
00171 SCVectordouble::operator=(const SCVectordouble& vd)
00172 {
00173   double a = vd.val();
00174   vector.set_element(i,a);
00175   return a;
00176 }
00177 INLINE
00178 SCVectordouble::operator double()
00179 {
00180   return vector.get_element(i);
00181 }
00182 INLINE double
00183 SCVectordouble::val() const
00184 {
00185   return vector.get_element(i);
00186 }
00187 
00188 #undef INLINE
00189 
00190 #endif
00191 
00192 // Local Variables:
00193 // mode: c++
00194 // c-file-style: "CLJ"
00195 // End:

Generated at Thu Oct 4 18:08:45 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.