Commit 87ece7d2042890a92b06bc223c9091a5728fcc16
1 parent
02869c99
Exists in
master
and in
87 other branches
Add getColumn function in Tab2D data container (for #6624)
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
src/Parameters/VisitorOfParamData.hh
... | ... | @@ -158,6 +158,17 @@ public : |
158 | 158 | return _dim1Size*_dim2Size; |
159 | 159 | } |
160 | 160 | |
161 | + std::vector<Type> getColumn(const int col) | |
162 | + { | |
163 | + if (col < 0 || col >= _dim2Size) | |
164 | + throw; | |
165 | + std::vector<Type> r; | |
166 | + for (int i = 0; i < _dim1Size; ++i) { | |
167 | + r.push_back(_rows[i][col]); | |
168 | + } | |
169 | + return r; | |
170 | + } | |
171 | + | |
161 | 172 | Type getTotal(void) |
162 | 173 | { |
163 | 174 | Type r; /* << ElemNull(); | ... | ... |