![]() |
Rosetta Utilities
2015.09
|
Classes | |
struct | SolutionInfo |
Public Member Functions | |
Solver () | |
virtual | ~Solver () |
void | Solve (int l, const QMatrix &Q, const double *p_, const schar *y_, double *alpha_, double Cp, double Cn, double eps, SolutionInfo *si, int shrinking) |
Protected Types | |
enum | { LOWER_BOUND, UPPER_BOUND, FREE } |
Protected Member Functions | |
double | get_C (int i) |
void | update_alpha_status (int i) |
bool | is_upper_bound (int i) |
bool | is_lower_bound (int i) |
bool | is_free (int i) |
void | swap_index (int i, int j) |
void | reconstruct_gradient () |
virtual int | select_working_set (int &i, int &j) |
virtual double | calculate_rho () |
virtual void | do_shrinking () |
Protected Attributes | |
int | active_size |
schar * | y |
double * | G |
char * | alpha_status |
double * | alpha |
const QMatrix * | Q |
const double * | QD |
double | eps |
double | Cp |
double | Cn |
double * | p |
int * | active_set |
double * | G_bar |
int | l |
bool | unshrink |
Private Member Functions | |
bool | be_shrunk (int i, double Gmax1, double Gmax2) |
|
inline |
|
inlinevirtual |
References G, is_lower_bound(), is_upper_bound(), and y.
Referenced by do_shrinking().
|
protectedvirtual |
Reimplemented in Solver_NU.
References active_size, G, INF, is_lower_bound(), is_upper_bound(), max(), min(), and y.
Referenced by Solve().
|
protectedvirtual |
Reimplemented in Solver_NU.
References active_size, be_shrunk(), eps, G, INF, info(), is_lower_bound(), is_upper_bound(), l, reconstruct_gradient(), swap_index(), unshrink, and y.
Referenced by Solve().
Referenced by Solve(), and update_alpha_status().
References alpha_status, and FREE.
Referenced by reconstruct_gradient().
References alpha_status, and LOWER_BOUND.
Referenced by be_shrunk(), Solver_NU::be_shrunk(), calculate_rho(), Solver_NU::calculate_rho(), do_shrinking(), Solver_NU::do_shrinking(), select_working_set(), Solver_NU::select_working_set(), and Solve().
References alpha_status, and UPPER_BOUND.
Referenced by be_shrunk(), Solver_NU::be_shrunk(), calculate_rho(), Solver_NU::calculate_rho(), do_shrinking(), Solver_NU::do_shrinking(), select_working_set(), Solver_NU::select_working_set(), and Solve().
|
protected |
References active_size, alpha, G, G_bar, QMatrix::get_Q(), info(), is_free(), l, p, and Q.
Referenced by do_shrinking(), Solver_NU::do_shrinking(), and Solve().
Reimplemented in Solver_NU.
References active_size, eps, G, QMatrix::get_Q(), INF, is_lower_bound(), is_upper_bound(), Q, QD, TAU, and y.
Referenced by Solve().
void Solver::Solve | ( | int | l, |
const QMatrix & | Q, | ||
const double * | p_, | ||
const schar * | y_, | ||
double * | alpha_, | ||
double | Cp, | ||
double | Cn, | ||
double | eps, | ||
SolutionInfo * | si, | ||
int | shrinking | ||
) |
References active_set, active_size, alpha, alpha_status, calculate_rho(), clone(), Cn, Cp, do_shrinking(), eps, G, G_bar, get_C(), QMatrix::get_Q(), QMatrix::get_QD(), info(), is_lower_bound(), is_upper_bound(), l, max(), min(), Solver::SolutionInfo::obj, p, Q, QD, reconstruct_gradient(), Solver::SolutionInfo::rho, select_working_set(), numeric::sum(), TAU, unshrink, update_alpha_status(), Solver::SolutionInfo::upper_bound_n, Solver::SolutionInfo::upper_bound_p, and y.
Referenced by Solver_NU::Solve(), solve_c_svc(), solve_epsilon_svr(), and solve_one_class().
References active_set, alpha, alpha_status, G, G_bar, p, Q, swap(), QMatrix::swap_index(), and y.
Referenced by do_shrinking(), and Solver_NU::do_shrinking().
|
inlineprotected |
References alpha, alpha_status, FREE, get_C(), LOWER_BOUND, and UPPER_BOUND.
Referenced by Solve().
|
protected |
Referenced by Solve(), and swap_index().
|
protected |
|
protected |
Referenced by reconstruct_gradient(), Solve(), swap_index(), and update_alpha_status().
|
protected |
Referenced by is_free(), is_lower_bound(), is_upper_bound(), Solve(), swap_index(), and update_alpha_status().
|
protected |
Referenced by do_shrinking(), Solver_NU::do_shrinking(), select_working_set(), Solver_NU::select_working_set(), and Solve().
|
protected |
|
protected |
Referenced by reconstruct_gradient(), Solve(), and swap_index().
|
protected |
Referenced by do_shrinking(), Solver_NU::do_shrinking(), reconstruct_gradient(), and Solve().
|
protected |
Referenced by reconstruct_gradient(), Solve(), and swap_index().
|
protected |
Referenced by reconstruct_gradient(), select_working_set(), Solver_NU::select_working_set(), Solve(), and swap_index().
|
protected |
Referenced by select_working_set(), Solver_NU::select_working_set(), and Solve().
|
protected |
Referenced by do_shrinking(), Solver_NU::do_shrinking(), and Solve().
|
protected |