Rosetta
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

 Solver ()=default
 
virtual ~Solver ()=default
 
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
 
schary
 
doubleG
 
char * alpha_status
 
doublealpha
 
const QMatrixQ
 
const doubleQD
 
double eps
 
double Cp
 
double Cn
 
doublep
 
int * active_set
 
doubleG_bar
 
int l
 
bool unshrink
 

Private Member Functions

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
LOWER_BOUND 
UPPER_BOUND 
FREE 

Constructor & Destructor Documentation

◆ Solver()

Solver::Solver ( )
default

◆ ~Solver()

virtual Solver::~Solver ( )
virtualdefault

Member Function Documentation

◆ be_shrunk()

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

◆ calculate_rho()

double Solver::calculate_rho ( )
protectedvirtual

◆ do_shrinking()

void Solver::do_shrinking ( )
protectedvirtual

◆ get_C()

double Solver::get_C ( int  i)
inlineprotected

References Cn, Cp, create_a3b_hbs::i, and y.

Referenced by Solve(), and update_alpha_status().

◆ is_free()

bool Solver::is_free ( int  i)
inlineprotected

References alpha_status, FREE, and create_a3b_hbs::i.

Referenced by reconstruct_gradient().

◆ is_lower_bound()

bool Solver::is_lower_bound ( int  i)
inlineprotected

◆ is_upper_bound()

bool Solver::is_upper_bound ( int  i)
inlineprotected

◆ reconstruct_gradient()

void Solver::reconstruct_gradient ( )
protected

◆ select_working_set()

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

◆ 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 
)

◆ swap_index()

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

◆ update_alpha_status()

void Solver::update_alpha_status ( int  i)
inlineprotected

Member Data Documentation

◆ active_set

int* Solver::active_set
protected

Referenced by Solve(), and swap_index().

◆ active_size

int Solver::active_size
protected

◆ alpha

double* Solver::alpha
protected

◆ alpha_status

char* Solver::alpha_status
protected

◆ Cn

double Solver::Cn
protected

Referenced by get_C(), and Solve().

◆ Cp

double Solver::Cp
protected

Referenced by get_C(), and Solve().

◆ eps

double Solver::eps
protected

◆ G

double* Solver::G
protected

Referenced by Solve().

◆ G_bar

double* Solver::G_bar
protected

◆ l

int Solver::l
protected

◆ p

double* Solver::p
protected

◆ Q

const QMatrix* Solver::Q
protected

◆ QD

const double* Solver::QD
protected

◆ unshrink

bool Solver::unshrink
protected

◆ y

schar* Solver::y
protected

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