celeste::Solver Class Reference

Inheritance diagram for celeste::Solver:

Inheritance graph
[legend]
List of all members.

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

 LOWER_BOUND
 UPPER_BOUND
 FREE
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
schary
double * G
char * alpha_status
double * alpha
const QMatrixQ
const QfloatQD
double eps
double Cp
double Cn
double * p
int * active_set
double * G_bar
int l
bool unshrinked

Private Member Functions

bool be_shrunken (int i, double Gmax1, double Gmax2)

Classes

struct  SolutionInfo

Detailed Description

Definition at line 425 of file svm.cpp.


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
LOWER_BOUND 
UPPER_BOUND 
FREE 

Definition at line 445 of file svm.cpp.


Constructor & Destructor Documentation

celeste::Solver::Solver (  )  [inline]

Definition at line 427 of file svm.cpp.

virtual celeste::Solver::~Solver (  )  [inline, virtual]

Definition at line 428 of file svm.cpp.


Member Function Documentation

bool celeste::Solver::be_shrunken ( int  i,
double  Gmax1,
double  Gmax2 
) [private]

Definition at line 882 of file svm.cpp.

References G, is_lower_bound(), is_upper_bound(), and y.

Referenced by do_shrinking().

double celeste::Solver::calculate_rho (  )  [protected, virtual]

Reimplemented in celeste::Solver_NU.

Definition at line 979 of file svm.cpp.

References active_size, G, INF, is_lower_bound(), is_upper_bound(), celeste::max(), celeste::min(), and y.

Referenced by Solve().

void celeste::Solver::do_shrinking (  )  [protected, virtual]

Reimplemented in celeste::Solver_NU.

Definition at line 902 of file svm.cpp.

References active_size, be_shrunken(), eps, G, INF, is_lower_bound(), is_upper_bound(), l, reconstruct_gradient(), swap_index(), unshrinked, and y.

Referenced by Solve().

double celeste::Solver::get_C ( int  i  )  [inline, protected]

Definition at line 458 of file svm.cpp.

References Cn, Cp, and y.

Referenced by Solve(), and update_alpha_status().

bool celeste::Solver::is_free ( int  i  )  [inline, protected]

Definition at line 472 of file svm.cpp.

References alpha_status, and FREE.

Referenced by reconstruct_gradient().

bool celeste::Solver::is_lower_bound ( int  i  )  [inline, protected]

Definition at line 471 of file svm.cpp.

References alpha_status, and LOWER_BOUND.

Referenced by celeste::Solver_NU::be_shrunken(), be_shrunken(), celeste::Solver_NU::calculate_rho(), calculate_rho(), celeste::Solver_NU::do_shrinking(), do_shrinking(), celeste::Solver_NU::select_working_set(), select_working_set(), and Solve().

bool celeste::Solver::is_upper_bound ( int  i  )  [inline, protected]

Definition at line 470 of file svm.cpp.

References alpha_status, and UPPER_BOUND.

Referenced by celeste::Solver_NU::be_shrunken(), be_shrunken(), celeste::Solver_NU::calculate_rho(), calculate_rho(), celeste::Solver_NU::do_shrinking(), do_shrinking(), celeste::Solver_NU::select_working_set(), select_working_set(), and Solve().

void celeste::Solver::reconstruct_gradient (  )  [protected]

Definition at line 494 of file svm.cpp.

References active_size, alpha, G, G_bar, celeste::QMatrix::get_Q(), is_free(), l, p, and Q.

Referenced by celeste::Solver_NU::do_shrinking(), do_shrinking(), and Solve().

int celeste::Solver::select_working_set ( int &  i,
int &  j 
) [protected, virtual]

Reimplemented in celeste::Solver_NU.

Definition at line 783 of file svm.cpp.

References active_size, eps, G, celeste::QMatrix::get_Q(), INF, is_lower_bound(), is_upper_bound(), Q, QD, TAU, and y.

Referenced by Solve().

void celeste::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 
)

Definition at line 514 of file svm.cpp.

References active_set, active_size, alpha, alpha_status, calculate_rho(), celeste::clone(), do_shrinking(), G, G_bar, get_C(), celeste::QMatrix::get_Q(), celeste::QMatrix::get_QD(), celeste::info(), celeste::info_flush(), is_lower_bound(), is_upper_bound(), celeste::min(), celeste::Solver::SolutionInfo::obj, p, Q, QD, reconstruct_gradient(), celeste::Solver::SolutionInfo::rho, select_working_set(), TAU, unshrinked, update_alpha_status(), celeste::Solver::SolutionInfo::upper_bound_n, celeste::Solver::SolutionInfo::upper_bound_p, and y.

Referenced by celeste::Solver_NU::Solve(), celeste::solve_c_svc(), and celeste::solve_epsilon_svr().

void celeste::Solver::swap_index ( int  i,
int  j 
) [protected]

Definition at line 482 of file svm.cpp.

References active_set, alpha, alpha_status, G, G_bar, p, Q, celeste::swap(), celeste::QMatrix::swap_index(), and y.

Referenced by celeste::Solver_NU::do_shrinking(), and do_shrinking().

void celeste::Solver::update_alpha_status ( int  i  )  [inline, protected]

Definition at line 462 of file svm.cpp.

References alpha, alpha_status, FREE, get_C(), LOWER_BOUND, and UPPER_BOUND.

Referenced by Solve().


Member Data Documentation

int* celeste::Solver::active_set [protected]

Definition at line 453 of file svm.cpp.

Referenced by Solve(), and swap_index().

int celeste::Solver::active_size [protected]

Definition at line 442 of file svm.cpp.

Referenced by celeste::Solver_NU::calculate_rho(), calculate_rho(), celeste::Solver_NU::do_shrinking(), do_shrinking(), reconstruct_gradient(), celeste::Solver_NU::select_working_set(), select_working_set(), and Solve().

double* celeste::Solver::alpha [protected]

Definition at line 447 of file svm.cpp.

Referenced by reconstruct_gradient(), Solve(), swap_index(), and update_alpha_status().

char* celeste::Solver::alpha_status [protected]

Definition at line 446 of file svm.cpp.

Referenced by is_free(), is_lower_bound(), is_upper_bound(), Solve(), swap_index(), and update_alpha_status().

double celeste::Solver::Cn [protected]

Definition at line 451 of file svm.cpp.

Referenced by get_C().

double celeste::Solver::Cp [protected]

Definition at line 451 of file svm.cpp.

Referenced by get_C().

double celeste::Solver::eps [protected]

Definition at line 450 of file svm.cpp.

Referenced by celeste::Solver_NU::do_shrinking(), do_shrinking(), celeste::Solver_NU::select_working_set(), and select_working_set().

double* celeste::Solver::G [protected]

Definition at line 444 of file svm.cpp.

Referenced by celeste::Solver_NU::be_shrunken(), be_shrunken(), celeste::Solver_NU::calculate_rho(), calculate_rho(), celeste::Solver_NU::do_shrinking(), do_shrinking(), reconstruct_gradient(), celeste::Solver_NU::select_working_set(), select_working_set(), Solve(), and swap_index().

double* celeste::Solver::G_bar [protected]

Definition at line 454 of file svm.cpp.

Referenced by reconstruct_gradient(), Solve(), and swap_index().

int celeste::Solver::l [protected]

Definition at line 455 of file svm.cpp.

Referenced by celeste::Solver_NU::do_shrinking(), do_shrinking(), and reconstruct_gradient().

double* celeste::Solver::p [protected]

Definition at line 452 of file svm.cpp.

Referenced by reconstruct_gradient(), Solve(), and swap_index().

const QMatrix* celeste::Solver::Q [protected]

Definition at line 448 of file svm.cpp.

Referenced by reconstruct_gradient(), celeste::Solver_NU::select_working_set(), select_working_set(), celeste::Solver_NU::Solve(), Solve(), and swap_index().

const Qfloat* celeste::Solver::QD [protected]

Definition at line 449 of file svm.cpp.

Referenced by celeste::Solver_NU::select_working_set(), select_working_set(), and Solve().

bool celeste::Solver::unshrinked [protected]

Definition at line 456 of file svm.cpp.

Referenced by celeste::Solver_NU::do_shrinking(), do_shrinking(), and Solve().

schar* celeste::Solver::y [protected]

Definition at line 443 of file svm.cpp.

Referenced by celeste::Solver_NU::be_shrunken(), be_shrunken(), celeste::Solver_NU::calculate_rho(), calculate_rho(), celeste::Solver_NU::do_shrinking(), do_shrinking(), get_C(), celeste::Solver_NU::select_working_set(), select_working_set(), Solve(), and swap_index().


The documentation for this class was generated from the following file:
Generated on 1 Nov 2014 for Hugintrunk by  doxygen 1.4.7