|
matrix_i.h00001 // 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 namespace sc { 00045 00046 // ///////////////////////////////////////////////////////////////////////// 00047 // SCMatrixdouble inline candidates 00048 00049 INLINE 00050 SCMatrixdouble::SCMatrixdouble(SCMatrix*a,int b,int c): 00051 matrix(a),i(b),j(c) 00052 { 00053 } 00054 INLINE 00055 SCMatrixdouble::~SCMatrixdouble() 00056 { 00057 } 00058 INLINE double 00059 SCMatrixdouble::operator=(double a) 00060 { 00061 matrix.set_element(i,j,a); 00062 return a; 00063 } 00064 INLINE double 00065 SCMatrixdouble::operator=(const SCMatrixdouble& md) 00066 { 00067 double a = md.val(); 00068 matrix.set_element(i,j,a); 00069 return a; 00070 } 00071 INLINE 00072 SCMatrixdouble::operator double() 00073 { 00074 return matrix.get_element(i,j); 00075 } 00076 INLINE double 00077 SCMatrixdouble::val() const 00078 { 00079 return matrix.get_element(i,j); 00080 } 00081 00082 // ///////////////////////////////////////////////////////////////////////// 00083 // SymmSCMatrixdouble inline candidates 00084 00085 INLINE 00086 SymmSCMatrixdouble::SymmSCMatrixdouble(SymmSCMatrix*a,int b,int c): 00087 matrix(a),i(b),j(c) 00088 { 00089 } 00090 INLINE 00091 SymmSCMatrixdouble::~SymmSCMatrixdouble() 00092 { 00093 } 00094 INLINE double 00095 SymmSCMatrixdouble::operator=(double a) 00096 { 00097 matrix.set_element(i,j,a); 00098 return a; 00099 } 00100 INLINE double 00101 SymmSCMatrixdouble::operator=(const SymmSCMatrixdouble& md) 00102 { 00103 double a = md.val(); 00104 matrix.set_element(i,j,a); 00105 return a; 00106 } 00107 INLINE 00108 SymmSCMatrixdouble::operator double() 00109 { 00110 return matrix.get_element(i,j); 00111 } 00112 INLINE double 00113 SymmSCMatrixdouble::val() const 00114 { 00115 return matrix.get_element(i,j); 00116 } 00117 00118 // ///////////////////////////////////////////////////////////////////////// 00119 // DiagSCMatrixdouble inline candidates 00120 00121 INLINE 00122 DiagSCMatrixdouble::DiagSCMatrixdouble(DiagSCMatrix*a,int b,int c): 00123 matrix(a),i(b),j(c) 00124 { 00125 } 00126 INLINE 00127 DiagSCMatrixdouble::~DiagSCMatrixdouble() 00128 { 00129 } 00130 INLINE double 00131 DiagSCMatrixdouble::operator=(double a) 00132 { 00133 matrix.set_element(i,a); 00134 return a; 00135 } 00136 INLINE double 00137 DiagSCMatrixdouble::operator=(const DiagSCMatrixdouble& md) 00138 { 00139 double a = md.val(); 00140 matrix.set_element(i,a); 00141 return a; 00142 } 00143 INLINE 00144 DiagSCMatrixdouble::operator double() 00145 { 00146 return matrix.get_element(i); 00147 } 00148 INLINE double 00149 DiagSCMatrixdouble::val() const 00150 { 00151 return matrix.get_element(i); 00152 } 00153 00154 // ///////////////////////////////////////////////////////////////////////// 00155 // SCVectordouble inline candidates 00156 00157 INLINE 00158 SCVectordouble::SCVectordouble(SCVector*a,int b): 00159 vector(a),i(b) 00160 { 00161 } 00162 INLINE 00163 SCVectordouble::~SCVectordouble() 00164 { 00165 } 00166 INLINE double 00167 SCVectordouble::operator=(double a) 00168 { 00169 vector.set_element(i,a); 00170 return a; 00171 } 00172 INLINE double 00173 SCVectordouble::operator=(const SCVectordouble& vd) 00174 { 00175 double a = vd.val(); 00176 vector.set_element(i,a); 00177 return a; 00178 } 00179 INLINE 00180 SCVectordouble::operator double() 00181 { 00182 return vector.get_element(i); 00183 } 00184 INLINE double 00185 SCVectordouble::val() const 00186 { 00187 return vector.get_element(i); 00188 } 00189 00190 } 00191 00192 #undef INLINE 00193 00194 #endif 00195 00196 // Local Variables: 00197 // mode: c++ 00198 // c-file-style: "CLJ" 00199 // End: Generated at Fri Jan 10 08:14:09 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14. |