@@ -77,10 +77,10 @@ void assemble_system(Matrix6<T> &m,
7777 const Point &bmax = b.max ();
7878
7979 for (Eigen::Index iy = bmin.y (); iy <= bmax.y (); iy++) {
80- const T y = casts::to<T>(iy) * scale.y () - 1 ;
80+ const T y = ( casts::to<T>(iy) * scale.y () ) - 1 ;
8181
8282 for (Eigen::Index ix = bmin.x (); ix <= bmax.x (); ix++) {
83- const T x = casts::to<T>(ix) * scale.x () - 1 ;
83+ const T x = ( casts::to<T>(ix) * scale.x () ) - 1 ;
8484
8585 const T d =
8686 w (iy - bmin.y (), ix - bmin.x ()) * gsl::narrow_cast<T>(data (iy, ix));
@@ -154,7 +154,7 @@ bool extract_params(const Vector6<T> &chi, T &scale, Vector2<T> &mean, Matrix2<T
154154 mean.y () = (prec (0 , 0 ) * chi[4 ] - prec (0 , 1 ) * chi[3 ]) / d;
155155
156156 const T vtmv = mean.transpose () * prec * mean;
157- scale = std::exp (chi[5 ] + vtmv / casts::to<T>(2 ));
157+ scale = std::exp (chi[5 ] + ( vtmv / casts::to<T>(2 ) ));
158158
159159 return true ;
160160}
@@ -184,10 +184,10 @@ void update_weight_maps(std::vector<Parameters<typename DenseBase<Derived>::Scal
184184 const Point bmax = p.bounds .max ();
185185
186186 for (Eigen::Index iy = bmin.y (); iy <= bmax.y (); iy++) {
187- const T y = casts::to<T>(iy) * scale.y () - 1 ;
187+ const T y = ( casts::to<T>(iy) * scale.y () ) - 1 ;
188188
189189 for (Eigen::Index ix = bmin.x (); ix <= bmax.x (); ix++) {
190- const T x = casts::to<T>(ix) * scale.x () - 1 ;
190+ const T x = ( casts::to<T>(ix) * scale.x () ) - 1 ;
191191
192192 const T v = p.scale * gaussian_like ({x, y}, p.mean , p.prec );
193193 p.weights (iy - bmin.y (), ix - bmin.x ()) = v;
@@ -294,20 +294,20 @@ bool ge_solve(Matrix6<T> a, Vector6<T> b, Vector6<T> &x)
294294 x[5 ] = b[5 ];
295295 x[5 ] /= a (5 , 5 );
296296
297- x[4 ] = b[4 ] - a (5 , 4 ) * x[5 ];
297+ x[4 ] = b[4 ] - ( a (5 , 4 ) * x[5 ]) ;
298298 x[4 ] /= a (4 , 4 );
299299
300- x[3 ] = b[3 ] - a (5 , 3 ) * x[5 ] - a (4 , 3 ) * x[4 ];
300+ x[3 ] = b[3 ] - ( a (5 , 3 ) * x[5 ]) - ( a (4 , 3 ) * x[4 ]) ;
301301 x[3 ] /= a (3 , 3 );
302302
303- x[2 ] = b[2 ] - a (5 , 2 ) * x[5 ] - a (4 , 2 ) * x[4 ] - a (3 , 2 ) * x[3 ];
303+ x[2 ] = b[2 ] - ( a (5 , 2 ) * x[5 ]) - ( a (4 , 2 ) * x[4 ]) - ( a (3 , 2 ) * x[3 ]) ;
304304 x[2 ] /= a (2 , 2 );
305305
306- x[1 ] = b[1 ] - a (5 , 1 ) * x[5 ] - a (4 , 1 ) * x[4 ] - a (3 , 1 ) * x[3 ] - a (2 , 1 ) * x[2 ];
306+ x[1 ] = b[1 ] - ( a (5 , 1 ) * x[5 ]) - ( a (4 , 1 ) * x[4 ]) - ( a (3 , 1 ) * x[3 ]) - ( a (2 , 1 ) * x[2 ]) ;
307307 x[1 ] /= a (1 , 1 );
308308
309- x[0 ] = b[0 ] - a (5 , 0 ) * x[5 ] - a (4 , 0 ) * x[4 ] - a (3 , 0 ) * x[3 ] - a (2 , 0 ) * x[2 ] -
310- a (1 , 0 ) * x[1 ];
309+ x[0 ] = b[0 ] - ( a (5 , 0 ) * x[5 ]) - ( a (4 , 0 ) * x[4 ]) - ( a (3 , 0 ) * x[3 ]) - ( a (2 , 0 ) * x[2 ]) -
310+ ( a (1 , 0 ) * x[1 ]) ;
311311 x[0 ] /= a (0 , 0 );
312312
313313 return true ;
0 commit comments