Line data Source code
1 : /*
2 : * File: LinearOperator.cpp
3 : * Author: Pantelis Sopasakis
4 : *
5 : * Created on July 24, 2015, 8:44 PM
6 : *
7 : * ForBES is free software: you can redistribute it and/or modify
8 : * it under the terms of the GNU Lesser General Public License as published by
9 : * the Free Software Foundation, either version 3 of the License, or
10 : * (at your option) any later version.
11 : *
12 : * ForBES is distributed in the hope that it will be useful,
13 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 : * GNU Lesser General Public License for more details.
16 : *
17 : * You should have received a copy of the GNU Lesser General Public License
18 : * along with ForBES. If not, see <http://www.gnu.org/licenses/>.
19 : */
20 :
21 : #include "LinearOperator.h"
22 :
23 116 : LinearOperator::LinearOperator() {
24 116 : }
25 :
26 109 : LinearOperator::~LinearOperator() {
27 109 : }
28 :
29 58598 : Matrix LinearOperator::call(Matrix& x) {
30 58598 : Matrix y(dimensionOut().first, dimensionOut().second);
31 58598 : const double gamma = 0.0;
32 58598 : const double alpha = 1.0;
33 58598 : ForBESUtils::fail_on_error(call(y, alpha, x, gamma));
34 58598 : return y;
35 : }
36 :
37 58347 : Matrix LinearOperator::callAdjoint(Matrix& x) {
38 58347 : Matrix y_star(dimensionIn().first, dimensionIn().second);
39 58347 : const double gamma = 0.0;
40 58347 : const double alpha = 1.0;
41 58347 : ForBESUtils::fail_on_error(callAdjoint(y_star, alpha, x, gamma));
42 58347 : return y_star;
43 : }
|