summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-27 12:39:59 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-10-27 12:39:59 +0100
commit45ce9d604f2fe6f58318c8103f3f6125af9cb9bc (patch)
tree672e3314c6f4afed89b2c2c2b0d80756d6ef9961 /src
parent01861a7022cb7855bc1a8cd7f8cfd6282690a4f1 (diff)
downloadregularization-45ce9d604f2fe6f58318c8103f3f6125af9cb9bc.tar.gz
regularization-45ce9d604f2fe6f58318c8103f3f6125af9cb9bc.tar.bz2
regularization-45ce9d604f2fe6f58318c8103f3f6125af9cb9bc.tar.xz
regularization-45ce9d604f2fe6f58318c8103f3f6125af9cb9bc.zip
initializes R3
Bugfix, R2 was initialized twice, R3 never.
Diffstat (limited to 'src')
-rw-r--r--src/Python/fista_module.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Python/fista_module.cpp b/src/Python/fista_module.cpp
index aca3be0..f3add76 100644
--- a/src/Python/fista_module.cpp
+++ b/src/Python/fista_module.cpp
@@ -328,7 +328,6 @@ bp::list FGP_TV(np::ndarray input, double d_mu, int iter, double d_epsil, int me
else {
dim_array[2] = input.shape(2);
}
-
// Parameter handling is be done in Python
///*Handling Matlab input data*/
//if ((nrhs < 2) || (nrhs > 5)) mexErrMsgTxt("At least 2 parameters is required: Image(2D/3D), Regularization parameter. The full list of parameters: Image(2D/3D), Regularization parameter, iterations number, tolerance, penalty type ('iso' or 'l1')");
@@ -513,13 +512,11 @@ bp::list FGP_TV(np::ndarray input, double d_mu, int iter, double d_epsil, int me
P3_old = reinterpret_cast<float *>(npP3_old.get_data());
R1 = reinterpret_cast<float *>(npR1.get_data());
R2 = reinterpret_cast<float *>(npR2.get_data());
- R2 = reinterpret_cast<float *>(npR3.get_data());
+ R3 = reinterpret_cast<float *>(npR3.get_data());
/* begin iterations */
for (ll = 0; ll<iter; ll++) {
-
/* computing the gradient of the objective function */
Obj_func3D(A, D, R1, R2, R3, lambda, dimX, dimY, dimZ);
-
/*Taking a step towards minus of the gradient*/
Grad_func3D(P1, P2, P3, D, R1, R2, R3, lambda, dimX, dimY, dimZ);