Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Solver Class Reference
Inheritance diagram for Solver:
Inheritance graph
[legend]

Classes

struct  SolutionInfo
 

Public Member Functions

void Solve (int l, const QMatrix &Q, const double *p_, const schar *y_, double *alpha_, const double *C_, double eps, SolutionInfo *si, int shrinking)
 
 Solver ()
 
virtual ~Solver ()
 

Protected Types

enum  { LOWER_BOUND, UPPER_BOUND, FREE }
 

Protected Member Functions

virtual double calculate_rho ()
 
virtual void do_shrinking ()
 
double get_C (int i)
 
bool is_free (int i)
 
bool is_lower_bound (int i)
 
bool is_upper_bound (int i)
 
void reconstruct_gradient ()
 
virtual int select_working_set (int &i, int &j)
 
void swap_index (int i, int j)
 
void update_alpha_status (int i)
 

Protected Attributes

int * active_set
 
int active_size
 
double * alpha
 
char * alpha_status
 
double * C
 
double Cn
 
double Cp
 
double eps
 
double * G
 
double * G_bar
 
int l
 
double * p
 
const QMatrixQ
 
const double * QD
 
bool unshrink
 
schary
 

Private Member Functions

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

Detailed Description

Definition at line 434 of file svm.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
LOWER_BOUND 
UPPER_BOUND 
FREE 

Definition at line 453 of file svm.cpp.

Constructor & Destructor Documentation

◆ Solver()

Solver::Solver ( )
inline

Definition at line 436 of file svm.cpp.

◆ ~Solver()

virtual Solver::~Solver ( )
inlinevirtual

Definition at line 437 of file svm.cpp.

Member Function Documentation

◆ be_shrunk()

bool Solver::be_shrunk ( int  i,
double  Gmax1,
double  Gmax2 
)
private

Definition at line 927 of file svm.cpp.

◆ calculate_rho()

double Solver::calculate_rho ( )
protectedvirtual

Reimplemented in Solver_NU.

Definition at line 1008 of file svm.cpp.

◆ do_shrinking()

void Solver::do_shrinking ( )
protectedvirtual

Reimplemented in Solver_NU.

Definition at line 947 of file svm.cpp.

◆ get_C()

double Solver::get_C ( int  i)
inlineprotected

Definition at line 467 of file svm.cpp.

◆ is_free()

bool Solver::is_free ( int  i)
inlineprotected

Definition at line 481 of file svm.cpp.

◆ is_lower_bound()

bool Solver::is_lower_bound ( int  i)
inlineprotected

Definition at line 480 of file svm.cpp.

◆ is_upper_bound()

bool Solver::is_upper_bound ( int  i)
inlineprotected

Definition at line 479 of file svm.cpp.

◆ reconstruct_gradient()

void Solver::reconstruct_gradient ( )
protected

Definition at line 504 of file svm.cpp.

◆ select_working_set()

int Solver::select_working_set ( int &  i,
int &  j 
)
protectedvirtual

Reimplemented in Solver_NU.

Definition at line 828 of file svm.cpp.

◆ Solve()

void Solver::Solve ( int  l,
const QMatrix Q,
const double *  p_,
const schar y_,
double *  alpha_,
const double *  C_,
double  eps,
SolutionInfo si,
int  shrinking 
)

Definition at line 546 of file svm.cpp.

◆ swap_index()

void Solver::swap_index ( int  i,
int  j 
)
protected

Definition at line 491 of file svm.cpp.

◆ update_alpha_status()

void Solver::update_alpha_status ( int  i)
inlineprotected

Definition at line 471 of file svm.cpp.

Member Data Documentation

◆ active_set

int* Solver::active_set
protected

Definition at line 462 of file svm.cpp.

◆ active_size

int Solver::active_size
protected

Definition at line 450 of file svm.cpp.

◆ alpha

double* Solver::alpha
protected

Definition at line 455 of file svm.cpp.

◆ alpha_status

char* Solver::alpha_status
protected

Definition at line 454 of file svm.cpp.

◆ C

double* Solver::C
protected

Definition at line 460 of file svm.cpp.

◆ Cn

double Solver::Cn
protected

Definition at line 459 of file svm.cpp.

◆ Cp

double Solver::Cp
protected

Definition at line 459 of file svm.cpp.

◆ eps

double Solver::eps
protected

Definition at line 458 of file svm.cpp.

◆ G

double* Solver::G
protected

Definition at line 452 of file svm.cpp.

◆ G_bar

double* Solver::G_bar
protected

Definition at line 463 of file svm.cpp.

◆ l

int Solver::l
protected

Definition at line 464 of file svm.cpp.

◆ p

double* Solver::p
protected

Definition at line 461 of file svm.cpp.

◆ Q

const QMatrix* Solver::Q
protected

Definition at line 456 of file svm.cpp.

◆ QD

const double* Solver::QD
protected

Definition at line 457 of file svm.cpp.

◆ unshrink

bool Solver::unshrink
protected

Definition at line 465 of file svm.cpp.

◆ y

schar* Solver::y
protected

Definition at line 451 of file svm.cpp.


The documentation for this class was generated from the following file:


fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:50