(i, j int)
| 358 | } |
| 359 | |
| 360 | func (this *Solver) swap_index(i, j int) { |
| 361 | // todo |
| 362 | this.Q.swap_index(i, j) |
| 363 | //do {byte _=y[i]; y[i]=y[j]; y[j]=_;} while(false); |
| 364 | this.y[i], this.y[j] = this.y[j], this.y[i] |
| 365 | //do {float64 _=G[i]; G[i]=G[j]; G[j]=_;} while(false); |
| 366 | this.G[i], this.G[j] = this.G[j], this.G[i] |
| 367 | //do {byte _=alpha_status[i]; alpha_status[i]=alpha_status[j]; alpha_status[j]=_;} while(false); |
| 368 | this.alpha_status[i], this.alpha_status[j] = this.alpha_status[j], this.alpha_status[i] |
| 369 | //do {float64 _=alpha[i]; alpha[i]=alpha[j]; alpha[j]=_;} while(false); |
| 370 | this.alpha[i], this.alpha[j] = this.alpha[j], this.alpha[i] |
| 371 | //do {float64 _=p[i]; p[i]=p[j]; p[j]=_;} while(false); |
| 372 | this.p[i], this.p[j] = this.p[j], this.p[i] |
| 373 | //do {int _=active_set[i]; active_set[i]=active_set[j]; active_set[j]=_;} while(false); |
| 374 | this.active_set[i], this.active_set[j] = this.active_set[j], this.active_set[i] |
| 375 | //do {float64 _=G_bar[i]; G_bar[i]=G_bar[j]; G_bar[j]=_;} while(false); |
| 376 | this.G_bar[i], this.G_bar[j] = this.G_bar[j], this.G_bar[i] |
| 377 | } |
| 378 | |
| 379 | func (this *Solver) reconstruct_gradient() { |
| 380 | // reconstruct inactive elements of G from G_bar and free variables |
no test coverage detected