MPQC  3.0.0-alpha
matrix_i.h
1 //
2 // matrix_i.h
3 //
4 // Copyright (C) 1996 Limit Point Systems, Inc.
5 //
6 // Author: Curtis Janssen <cljanss@limitpt.com>
7 // Maintainer: LPS
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 // The U.S. Government is granted a limited license as per AL 91-7.
26 //
27 
28 #ifndef _math_scmat_matrix_i_h
29 #define _math_scmat_matrix_i_h
30 
31 #include <math/scmat/matrix.h>
32 
33 // These are the inline candidates for the members defined in matrix.h.
34 
35 #ifdef INLINE_FUNCTIONS
36 #define INLINE inline
37 #else
38 #define INLINE
39 #endif
40 
41 namespace sc {
42 
43 // /////////////////////////////////////////////////////////////////////////
44 // SCMatrixdouble inline candidates
45 
46 INLINE
47 SCMatrixdouble::SCMatrixdouble(SCMatrix*a,int b,int c):
48  matrix(a),i(b),j(c)
49 {
50 }
51 INLINE
52 SCMatrixdouble::~SCMatrixdouble()
53 {
54 }
55 INLINE double
56 SCMatrixdouble::operator=(double a)
57 {
58  matrix.set_element(i,j,a);
59  return a;
60 }
61 INLINE double
62 SCMatrixdouble::operator=(const SCMatrixdouble& md)
63 {
64  double a = md.val();
65  matrix.set_element(i,j,a);
66  return a;
67 }
68 INLINE
69 SCMatrixdouble::operator double() const
70 {
71  return matrix.get_element(i,j);
72 }
73 INLINE double
74 SCMatrixdouble::val() const
75 {
76  return matrix.get_element(i,j);
77 }
78 
79 // /////////////////////////////////////////////////////////////////////////
80 // SymmSCMatrixdouble inline candidates
81 
82 INLINE
83 SymmSCMatrixdouble::SymmSCMatrixdouble(SymmSCMatrix*a,int b,int c):
84  matrix(a),i(b),j(c)
85 {
86 }
87 INLINE
88 SymmSCMatrixdouble::~SymmSCMatrixdouble()
89 {
90 }
91 INLINE double
92 SymmSCMatrixdouble::operator=(double a)
93 {
94  matrix.set_element(i,j,a);
95  return a;
96 }
97 INLINE double
98 SymmSCMatrixdouble::operator=(const SymmSCMatrixdouble& md)
99 {
100  double a = md.val();
101  matrix.set_element(i,j,a);
102  return a;
103 }
104 INLINE
105 SymmSCMatrixdouble::operator double()
106 {
107  return matrix.get_element(i,j);
108 }
109 INLINE double
110 SymmSCMatrixdouble::val() const
111 {
112  return matrix.get_element(i,j);
113 }
114 
115 // /////////////////////////////////////////////////////////////////////////
116 // DiagSCMatrixdouble inline candidates
117 
118 INLINE
119 DiagSCMatrixdouble::DiagSCMatrixdouble(DiagSCMatrix*a,int b,int c):
120  matrix(a),i(b),j(c)
121 {
122 }
123 INLINE
124 DiagSCMatrixdouble::~DiagSCMatrixdouble()
125 {
126 }
127 INLINE double
128 DiagSCMatrixdouble::operator=(double a)
129 {
130  matrix.set_element(i,a);
131  return a;
132 }
133 INLINE double
134 DiagSCMatrixdouble::operator=(const DiagSCMatrixdouble& md)
135 {
136  double a = md.val();
137  matrix.set_element(i,a);
138  return a;
139 }
140 INLINE
141 DiagSCMatrixdouble::operator double()
142 {
143  return matrix.get_element(i);
144 }
145 INLINE double
146 DiagSCMatrixdouble::val() const
147 {
148  return matrix.get_element(i);
149 }
150 
151 // /////////////////////////////////////////////////////////////////////////
152 // SCVectordouble inline candidates
153 
154 INLINE
155 SCVectordouble::SCVectordouble(SCVector*a,int b):
156  vector(a),i(b)
157 {
158 }
159 INLINE
160 SCVectordouble::~SCVectordouble()
161 {
162 }
163 INLINE double
164 SCVectordouble::operator=(double a)
165 {
166  vector.set_element(i,a);
167  return a;
168 }
169 INLINE double
170 SCVectordouble::operator=(const SCVectordouble& vd)
171 {
172  double a = vd.val();
173  vector.set_element(i,a);
174  return a;
175 }
176 INLINE
177 SCVectordouble::operator double()
178 {
179  return vector.get_element(i);
180 }
181 INLINE double
182 SCVectordouble::val() const
183 {
184  return vector.get_element(i);
185 }
186 
187 }
188 
189 #undef INLINE
190 
191 #endif
192 
193 // Local Variables:
194 // mode: c++
195 // c-file-style: "CLJ"
196 // End:
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

Generated at Sun Jan 26 2020 23:24:00 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.