MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
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
41namespace sc {
42
43// /////////////////////////////////////////////////////////////////////////
44// SCMatrixdouble inline candidates
45
46INLINE
47SCMatrixdouble::SCMatrixdouble(SCMatrix*a,int b,int c):
48 matrix(a),i(b),j(c)
49{
50}
51INLINE
52SCMatrixdouble::~SCMatrixdouble()
53{
54}
55INLINE double
56SCMatrixdouble::operator=(double a)
57{
58 matrix.set_element(i,j,a);
59 return a;
60}
61INLINE double
62SCMatrixdouble::operator=(const SCMatrixdouble& md)
63{
64 double a = md.val();
65 matrix.set_element(i,j,a);
66 return a;
67}
68INLINE
69SCMatrixdouble::operator double() const
70{
71 return matrix.get_element(i,j);
72}
73INLINE double
74SCMatrixdouble::val() const
75{
76 return matrix.get_element(i,j);
77}
78
79// /////////////////////////////////////////////////////////////////////////
80// SymmSCMatrixdouble inline candidates
81
82INLINE
83SymmSCMatrixdouble::SymmSCMatrixdouble(SymmSCMatrix*a,int b,int c):
84 matrix(a),i(b),j(c)
85{
86}
87INLINE
88SymmSCMatrixdouble::~SymmSCMatrixdouble()
89{
90}
91INLINE double
92SymmSCMatrixdouble::operator=(double a)
93{
94 matrix.set_element(i,j,a);
95 return a;
96}
97INLINE double
98SymmSCMatrixdouble::operator=(const SymmSCMatrixdouble& md)
99{
100 double a = md.val();
101 matrix.set_element(i,j,a);
102 return a;
103}
104INLINE
105SymmSCMatrixdouble::operator double()
106{
107 return matrix.get_element(i,j);
108}
109INLINE double
110SymmSCMatrixdouble::val() const
111{
112 return matrix.get_element(i,j);
113}
114
115// /////////////////////////////////////////////////////////////////////////
116// DiagSCMatrixdouble inline candidates
117
118INLINE
119DiagSCMatrixdouble::DiagSCMatrixdouble(DiagSCMatrix*a,int b,int c):
120 matrix(a),i(b),j(c)
121{
122}
123INLINE
124DiagSCMatrixdouble::~DiagSCMatrixdouble()
125{
126}
127INLINE double
128DiagSCMatrixdouble::operator=(double a)
129{
130 matrix.set_element(i,a);
131 return a;
132}
133INLINE double
134DiagSCMatrixdouble::operator=(const DiagSCMatrixdouble& md)
135{
136 double a = md.val();
137 matrix.set_element(i,a);
138 return a;
139}
140INLINE
141DiagSCMatrixdouble::operator double()
142{
143 return matrix.get_element(i);
144}
145INLINE double
146DiagSCMatrixdouble::val() const
147{
148 return matrix.get_element(i);
149}
150
151// /////////////////////////////////////////////////////////////////////////
152// SCVectordouble inline candidates
153
154INLINE
155SCVectordouble::SCVectordouble(SCVector*a,int b):
156 vector(a),i(b)
157{
158}
159INLINE
160SCVectordouble::~SCVectordouble()
161{
162}
163INLINE double
164SCVectordouble::operator=(double a)
165{
166 vector.set_element(i,a);
167 return a;
168}
169INLINE double
170SCVectordouble::operator=(const SCVectordouble& vd)
171{
172 double a = vd.val();
173 vector.set_element(i,a);
174 return a;
175}
176INLINE
177SCVectordouble::operator double()
178{
179 return vector.get_element(i);
180}
181INLINE double
182SCVectordouble::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:
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:30 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.