File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,39 +130,37 @@ static void wsum_hess_init_vector_args(expr *node)
130130
131131static void eval_wsum_hess_vector_args (expr * node , const double * w )
132132{
133-
134- int i , x_id , y_id ;
135133 double * x = node -> left -> value ;
136134 double * y = node -> right -> value ;
137135 double * hess = node -> wsum_hess -> x ;
138136
139137 if (node -> left -> var_id < node -> right -> var_id )
140138 {
141- for (i = 0 ; i < node -> d1 ; i ++ )
139+ for (int i = 0 ; i < node -> d1 ; i ++ )
142140 {
143141 hess [2 * i ] = w [i ] / x [i ];
144142 hess [2 * i + 1 ] = - w [i ] / y [i ];
145143 }
146144
147145 hess += 2 * node -> d1 ;
148146
149- for (i = 0 ; i < node -> d1 ; i ++ )
147+ for (int i = 0 ; i < node -> d1 ; i ++ )
150148 {
151149 hess [2 * i ] = - w [i ] / y [i ];
152150 hess [2 * i + 1 ] = w [i ] * x [i ] / (y [i ] * y [i ]);
153151 }
154152 }
155153 else
156154 {
157- for (i = 0 ; i < node -> d1 ; i ++ )
155+ for (int i = 0 ; i < node -> d1 ; i ++ )
158156 {
159157 hess [2 * i ] = w [i ] * x [i ] / (y [i ] * y [i ]);
160158 hess [2 * i + 1 ] = - w [i ] / y [i ];
161159 }
162160
163161 hess += 2 * node -> d1 ;
164162
165- for (i = 0 ; i < node -> d1 ; i ++ )
163+ for (int i = 0 ; i < node -> d1 ; i ++ )
166164 {
167165 hess [2 * i ] = - w [i ] / y [i ];
168166 hess [2 * i + 1 ] = w [i ] / x [i ];
You can’t perform that action at this time.
0 commit comments