MCPcopy Create free account
hub / github.com/datastream/libsvm / update_alpha_status

Method update_alpha_status

svm.go:332–340  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

330}
331
332func (this *Solver) update_alpha_status(i int) {
333 if this.alpha[i] >= this.get_C(i) {
334 this.alpha_status[i] = UPPER_BOUND
335 } else if this.alpha[i] <= 0 {
336 this.alpha_status[i] = LOWER_BOUND
337 } else {
338 this.alpha_status[i] = FREE
339 }
340}
341
342func (this *Solver) is_upper_bound(i int) bool {
343 return this.alpha_status[i] == UPPER_BOUND

Callers 1

SolveMethod · 0.95

Calls 1

get_CMethod · 0.95

Tested by

no test coverage detected