MPQC  2.3.1
blkiter.h
1 //
2 // blkiter.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_blkiter_h
29 #define _math_scmat_blkiter_h
30 
31 #ifdef __GNUC__
32 #pragma interface
33 #endif
34 
35 #include <math/scmat/block.h>
36 
37 namespace sc {
38 
39 class SCMatrixRectBlock;
40 class SCMatrixLTriBlock;
41 class SCMatrixDiagBlock;
42 class SCVectorSimpleBlock;
43 
44 class SCElementOp;
45 class SCElementOp2;
46 class SCElementOp3;
47 
51  public:
53  virtual ~SCMatrixBlockIter();
55  virtual int i() = 0;
57  virtual int j() = 0;
59  virtual void set(double val) = 0;
61  virtual void accum(double val);
63  virtual double get() = 0;
65  virtual operator int() = 0;
67  virtual void operator++() = 0; // prefix ++
68  void operator++(int) { operator++(); }
70  virtual void reset() = 0;
71 };
72 
74  private:
75  SCMatrixRectBlock* block;
76  int i_;
77  int block_index;
78  int j_;
79  public:
81  virtual ~SCMatrixRectBlockIter();
82  int i();
83  int j();
84  double get();
85  void set(double);
86  operator int();
87  void operator++();
88  void reset();
89 };
90 
92  private:
93  SCMatrixRectSubBlock* block;
94  int i_;
95  int block_index;
96  int j_;
97  public:
99  virtual ~SCMatrixRectSubBlockIter();
100  int i();
101  int j();
102  double get();
103  void set(double);
104  operator int();
105  void operator++();
106  void reset();
107 };
108 
110  private:
111  SCMatrixLTriBlock* block;
112  int block_index;
113  int i_;
114  int j_;
115  public:
117  virtual ~SCMatrixLTriBlockIter();
118  int i();
119  int j();
120  double get();
121  void set(double);
122  operator int();
123  void operator++();
124  void reset();
125 };
126 
128  private:
129  SCMatrixLTriSubBlock* block;
130  int block_index;
131  int i_;
132  int j_;
133  public:
135  virtual ~SCMatrixLTriSubBlockIter();
136  int i();
137  int j();
138  double get();
139  void set(double);
140  operator int();
141  void operator++();
142  void reset();
143 };
144 
146  private:
147  SCMatrixDiagBlock* block;
148  int block_index;
149  int i_;
150  public:
152  virtual ~SCMatrixDiagBlockIter();
153  int i();
154  int j();
155  double get();
156  void set(double);
157  operator int();
158  void operator++();
159  void reset();
160 };
161 
163  private:
164  SCMatrixDiagSubBlock* block;
165  int block_index;
166  int i_;
167  public:
169  virtual ~SCMatrixDiagSubBlockIter();
170  int i();
171  int j();
172  double get();
173  void set(double);
174  operator int();
175  void operator++();
176  void reset();
177 };
178 
180  private:
181  SCVectorSimpleBlock* block;
182  int block_index;
183  int i_;
184  public:
186  virtual ~SCVectorSimpleBlockIter();
187  int i();
188  int j();
189  double get();
190  void set(double);
191  operator int();
192  void operator++();
193  void reset();
194 };
195 
197  private:
198  SCVectorSimpleSubBlock* block;
199  int block_index;
200  int i_;
201  public:
203  virtual ~SCVectorSimpleSubBlockIter();
204  int i();
205  int j();
206  double get();
207  void set(double);
208  operator int();
209  void operator++();
210  void reset();
211 };
212 
213 }
214 
215 #endif
216 
217 // Local Variables:
218 // mode: c++
219 // c-file-style: "CLJ"
220 // End:
sc::SCMatrixRectBlockIter::get
double get()
Return the value of the current element.
sc::SCMatrixBlockIter::j
virtual int j()=0
Returns the column index.
sc::SCMatrixLTriBlockIter::get
double get()
Return the value of the current element.
sc::SCMatrixDiagSubBlockIter::get
double get()
Return the value of the current element.
sc::SCMatrixRectBlockIter
Definition: blkiter.h:73
sc::SCMatrixRectBlockIter::i
int i()
Returns the row index.
sc::SCMatrixLTriBlockIter::set
void set(double)
Set the current element to val.
sc::SCVectorSimpleSubBlockIter::reset
void reset()
Start the iteration over.
sc::SCVectorSimpleBlockIter
Definition: blkiter.h:179
sc::SCVectorSimpleBlockIter::j
int j()
Returns the column index.
sc::SCMatrixRectBlockIter::j
int j()
Returns the column index.
sc::SCMatrixDiagBlockIter::j
int j()
Returns the column index.
sc::SCMatrixBlockIter::reset
virtual void reset()=0
Start the iteration over.
sc::SCMatrixDiagBlockIter::get
double get()
Return the value of the current element.
sc::SCMatrixLTriBlock
The SCMatrixLTriBlock describes a triangular piece of a matrix.
Definition: block.h:257
sc::SCMatrixRectBlock
The SCMatrixRectBlock describes a rectangular piece of a matrix.
Definition: block.h:187
sc::SCMatrixRectSubBlockIter::get
double get()
Return the value of the current element.
sc::SCMatrixLTriSubBlock
The SCMatrixLTriSubBlock describes a triangular subblock of a matrix.
Definition: block.h:292
sc::SCMatrixDiagSubBlockIter::i
int i()
Returns the row index.
sc::SCVectorSimpleBlockIter::i
int i()
Returns the row index.
sc::SCMatrixBlockIter::get
virtual double get()=0
Return the value of the current element.
sc::SCMatrixRectSubBlockIter
Definition: blkiter.h:91
sc::SCMatrixLTriSubBlockIter::get
double get()
Return the value of the current element.
sc::SCVectorSimpleSubBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixLTriBlockIter::operator++
void operator++()
Move to the next element.
sc::SCVectorSimpleBlockIter::get
double get()
Return the value of the current element.
sc::SCVectorSimpleBlockIter::reset
void reset()
Start the iteration over.
sc::SCVectorSimpleSubBlockIter::j
int j()
Returns the column index.
sc::SCMatrixLTriSubBlockIter::reset
void reset()
Start the iteration over.
sc::SCMatrixDiagBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixRectBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixRectSubBlockIter::i
int i()
Returns the row index.
sc::SCVectorSimpleSubBlock
The SCVectorSimpleSubBlock describes a subblock of a vector.
Definition: block.h:158
sc::SCMatrixDiagBlockIter::i
int i()
Returns the row index.
sc::SCMatrixRectSubBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixLTriSubBlockIter
Definition: blkiter.h:127
sc::SCMatrixBlockIter::i
virtual int i()=0
Returns the row index.
sc::SCVectorSimpleBlockIter::set
void set(double)
Set the current element to val.
sc::SCMatrixDiagSubBlockIter::set
void set(double)
Set the current element to val.
sc::SCMatrixBlockIter::set
virtual void set(double val)=0
Set the current element to val.
sc::SCVectorSimpleBlock
The SCVectorSimpleBlock describes a piece of a vector.
Definition: block.h:127
sc::SCMatrixRectSubBlockIter::j
int j()
Returns the column index.
sc::SCMatrixBlockIter
The SCMatrixBlockIter class is used to described iterates that loop through the elements in a block.
Definition: blkiter.h:50
sc::SCMatrixDiagBlock
The SCMatrixDiagBlock describes a diagonal piece of a matrix.
Definition: block.h:322
sc::SCMatrixDiagBlockIter::reset
void reset()
Start the iteration over.
sc::SCMatrixDiagBlockIter::set
void set(double)
Set the current element to val.
sc::SCMatrixBlockIter::accum
virtual void accum(double val)
Add val to the current element.
sc::SCMatrixRectSubBlockIter::reset
void reset()
Start the iteration over.
sc::SCVectorSimpleSubBlockIter::i
int i()
Returns the row index.
sc::SCMatrixLTriBlockIter::j
int j()
Returns the column index.
sc::SCMatrixLTriBlockIter::reset
void reset()
Start the iteration over.
sc::SCMatrixLTriBlockIter
Definition: blkiter.h:109
sc::SCMatrixRectSubBlockIter::set
void set(double)
Set the current element to val.
sc::SCMatrixLTriSubBlockIter::i
int i()
Returns the row index.
sc::SCMatrixRectBlockIter::set
void set(double)
Set the current element to val.
sc::SCVectorSimpleSubBlockIter::get
double get()
Return the value of the current element.
sc::SCMatrixDiagSubBlockIter
Definition: blkiter.h:162
sc::SCMatrixRectBlockIter::reset
void reset()
Start the iteration over.
sc::SCMatrixDiagSubBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixBlockIter::operator++
virtual void operator++()=0
Move to the next element.
sc::SCMatrixRectSubBlock
The SCMatrixRectSubBlock describes a rectangular piece of a matrix.
Definition: block.h:223
sc::SCVectorSimpleSubBlockIter::set
void set(double)
Set the current element to val.
sc::SCMatrixLTriSubBlockIter::set
void set(double)
Set the current element to val.
sc::SCMatrixLTriSubBlockIter::operator++
void operator++()
Move to the next element.
sc::SCVectorSimpleSubBlockIter
Definition: blkiter.h:196
sc::SCVectorSimpleBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixLTriBlockIter::i
int i()
Returns the row index.
sc::SCMatrixDiagBlockIter
Definition: blkiter.h:145
sc::SCMatrixLTriSubBlockIter::j
int j()
Returns the column index.
sc::SCMatrixDiagSubBlockIter::reset
void reset()
Start the iteration over.
sc::SCMatrixDiagSubBlock
The SCMatrixDiagSubBlock describes a diagonal subblock of a matrix.
Definition: block.h:355
sc::SCMatrixDiagSubBlockIter::j
int j()
Returns the column index.

Generated at Sun Jan 26 2020 23:33:03 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.