MPQC  3.0.0-alpha
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 #include <math/scmat/block.h>
32 
33 namespace sc {
34 
35 class SCMatrixRectBlock;
36 class SCMatrixLTriBlock;
37 class SCMatrixDiagBlock;
38 class SCVectorSimpleBlock;
39 
40 class SCElementOp;
41 class SCElementOp2;
42 class SCElementOp3;
43 
47  public:
49  virtual ~SCMatrixBlockIter();
51  virtual int i() = 0;
53  virtual int j() = 0;
55  virtual void set(double val) = 0;
57  virtual void accum(double val);
59  virtual double get() = 0;
61  virtual operator int() = 0;
63  virtual void operator++() = 0; // prefix ++
64  void operator++(int) { operator++(); }
66  virtual void reset() = 0;
67 };
68 
70  private:
71  SCMatrixRectBlock* block;
72  int i_;
73  int block_index;
74  int j_;
75  public:
77  virtual ~SCMatrixRectBlockIter();
78  int i();
79  int j();
80  double get();
81  void set(double);
82  operator int();
83  void operator++();
84  void reset();
85 };
86 
88  private:
89  SCMatrixRectSubBlock* block;
90  int i_;
91  int block_index;
92  int j_;
93  public:
95  virtual ~SCMatrixRectSubBlockIter();
96  int i();
97  int j();
98  double get();
99  void set(double);
100  operator int();
101  void operator++();
102  void reset();
103 };
104 
106  private:
107  SCMatrixLTriBlock* block;
108  int block_index;
109  int i_;
110  int j_;
111  public:
113  virtual ~SCMatrixLTriBlockIter();
114  int i();
115  int j();
116  double get();
117  void set(double);
118  operator int();
119  void operator++();
120  void reset();
121 };
122 
124  private:
125  SCMatrixLTriSubBlock* block;
126  int block_index;
127  int i_;
128  int j_;
129  public:
131  virtual ~SCMatrixLTriSubBlockIter();
132  int i();
133  int j();
134  double get();
135  void set(double);
136  operator int();
137  void operator++();
138  void reset();
139 };
140 
142  private:
143  SCMatrixDiagBlock* block;
144  int block_index;
145  int i_;
146  public:
148  virtual ~SCMatrixDiagBlockIter();
149  int i();
150  int j();
151  double get();
152  void set(double);
153  operator int();
154  void operator++();
155  void reset();
156 };
157 
159  private:
160  SCMatrixDiagSubBlock* block;
161  int block_index;
162  int i_;
163  public:
165  virtual ~SCMatrixDiagSubBlockIter();
166  int i();
167  int j();
168  double get();
169  void set(double);
170  operator int();
171  void operator++();
172  void reset();
173 };
174 
176  private:
177  SCVectorSimpleBlock* block;
178  int block_index;
179  int i_;
180  public:
182  virtual ~SCVectorSimpleBlockIter();
183  int i();
184  int j();
185  double get();
186  void set(double);
187  operator int();
188  void operator++();
189  void reset();
190 };
191 
193  private:
194  SCVectorSimpleSubBlock* block;
195  int block_index;
196  int i_;
197  public:
199  virtual ~SCVectorSimpleSubBlockIter();
200  int i();
201  int j();
202  double get();
203  void set(double);
204  operator int();
205  void operator++();
206  void reset();
207 };
208 
209 }
210 
211 #endif
212 
213 // Local Variables:
214 // mode: c++
215 // c-file-style: "CLJ"
216 // 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:69
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:175
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:253
sc::SCMatrixRectBlock
The SCMatrixRectBlock describes a rectangular piece of a matrix.
Definition: block.h:183
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:288
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:87
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:154
sc::SCMatrixDiagBlockIter::i
int i()
Returns the row index.
sc::SCMatrixRectSubBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixLTriSubBlockIter
Definition: blkiter.h:123
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:123
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:46
sc::SCMatrixDiagBlock
The SCMatrixDiagBlock describes a diagonal piece of a matrix.
Definition: block.h:318
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:105
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:158
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:219
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:192
sc::SCVectorSimpleBlockIter::operator++
void operator++()
Move to the next element.
sc::SCMatrixLTriBlockIter::i
int i()
Returns the row index.
sc::SCMatrixDiagBlockIter
Definition: blkiter.h:141
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
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:351
sc::SCMatrixDiagSubBlockIter::j
int j()
Returns the column index.

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