library: libQuadp #include "TQpVar.h" |
TQpVar
class description - header file - source file - inheritance tree (.pdf)
protected:
static Double_t FindBlocking(TVectorD& w, TVectorD& wstep, TVectorD& u, TVectorD& ustep, Double_t maxStep, Double_t& w_elt, Double_t& wstep_elt, Double_t& u_elt, Double_t& ustep_elt, int& first_or_second)
static Double_t FindBlockingSub(Int_t n, Double_t* w, Int_t incw, Double_t* wstep, Int_t incwstep, Double_t* u, Int_t incu, Double_t* ustep, Int_t incustep, Double_t maxStep, Double_t& w_elt, Double_t& wstep_elt, Double_t& u_elt, Double_t& ustep_elt, Int_t& first_or_second)
static Double_t StepBound(TVectorD& v, TVectorD& dir, Double_t maxStep)
public:
TQpVar()
TQpVar(TVectorD& x_in, TVectorD& s_in, TVectorD& y_in, TVectorD& z_in, TVectorD& v_in, TVectorD& gamma_in, TVectorD& w_in, TVectorD& phi_in, TVectorD& t_in, TVectorD& lambda_in, TVectorD& u_in, TVectorD& pi_in, TVectorD& ixlow_in, TVectorD& ixupp_in, TVectorD& iclow_in, TVectorD& icupp_in)
TQpVar(Int_t nx, Int_t my, Int_t mz, TVectorD& ixlow, TVectorD& ixupp, TVectorD& iclow, TVectorD& icupp)
TQpVar(const TQpVar& another)
virtual ~TQpVar()
static TClass* Class()
virtual Double_t FindBlocking(TQpVar* step, Double_t& primalValue, Double_t& primalStep, Double_t& dualValue, Double_t& dualStep, Int_t& firstOrSecond)
virtual Double_t GetMu()
virtual void InteriorPoint(Double_t alpha, Double_t beta)
virtual TClass* IsA() const
virtual Bool_t IsInteriorPoint()
virtual Double_t MuStep(TQpVar* step, Double_t alpha)
virtual void Negate()
virtual Double_t Norm1()
virtual Double_t NormInf()
TQpVar& operator=(const TQpVar& source)
virtual void Print(Option_t* option = "") const
virtual void Saxpy(TQpVar* b, Double_t alpha)
virtual void ShiftBoundVariables(Double_t alpha, Double_t beta)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual Double_t StepBound(TQpVar* b)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual Bool_t ValidNonZeroPattern()
virtual Double_t Violation()
protected:
Int_t fNx
Int_t fMy
Int_t fMz
Int_t fNxup
Int_t fNxlo
Int_t fMcup
Int_t fMclo
TVectorD fXloIndex
TVectorD fXupIndex
TVectorD fCupIndex
TVectorD fCloIndex
public:
Int_t fNComplementaryVariables number of complementary primal-dual variables.
TVectorD fX
TVectorD fS
TVectorD fY
TVectorD fZ
TVectorD fV
TVectorD fPhi
TVectorD fW
TVectorD fGamma
TVectorD fT
TVectorD fLambda
TVectorD fU
TVectorD fPi
static const TQpVar::EVarBlock kno_block
static const TQpVar::EVarBlock kt_block
static const TQpVar::EVarBlock klambda_block
static const TQpVar::EVarBlock ku_block
static const TQpVar::EVarBlock kpi_block
static const TQpVar::EVarBlock kv_block
static const TQpVar::EVarBlock kgamma_block
static const TQpVar::EVarBlock kw_block
static const TQpVar::EVarBlock kphi_block
Class containing the variables for the general QP formulation
TQpVar(TVectorD &x_in,TVectorD &s_in,TVectorD &y_in,TVectorD &z_in, TVectorD &v_in,TVectorD &gamma_in,TVectorD &w_in,TVectorD &phi_in, TVectorD &t_in,TVectorD &lambda_in,TVectorD &u_in,TVectorD &pi_in, TVectorD &ixlow_in,TVectorD &ixupp_in,TVectorD &iclow_in,TVectorD &icupp_in)
Constructor
Double_t GetMu()
compute complementarity gap, obtained by taking the inner product of the
complementary vectors and dividing by the total number of components
computes mu = (t'lambda +u'pi + v'gamma + w'phi)/(mclow+mcupp+nxlow+nxupp)
void Saxpy(TQpVar *b,Double_t alpha)
Perform a "saxpy" operation on all data vectors : x += alpha*y
void Negate()
Perform a "negate" operation on all data vectors : x = -x
Double_t StepBound(TQpVar *b)
calculate the largest alpha in (0,1] such that the/ nonnegative variables stay
nonnegative in the given search direction. In the general QP problem formulation
this is the largest value of alpha such that
(t,u,v,w,lambda,pi,phi,gamma) + alpha * (b->t,b->u,b->v,b->w,b->lambda,b->pi,
b->phi,b->gamma) >= 0.
Double_t FindBlocking(TQpVar *step, Double_t &primalValue, Double_t &primalStep, Double_t &dualValue, Double_t &dualStep, Int_t &fIrstOrSecond)
Performs the same function as StepBound, and supplies additional information about
which component of the nonnegative variables is responsible for restricting alpha.
In terms of the abstract formulation, the components have the following meanings :
primalValue : the value of the blocking component of the primal variables (u,t,v,w).
primalStep : the corresponding value of the blocking component of the primal step
variables (b->u,b->t,b->v,b->w)
dualValue : the value of the blocking component of the dual variables
(lambda,pi,phi,gamma).
dualStep : the corresponding value of the blocking component of the dual step
variables (b->lambda,b->pi,b->phi,b->gamma)
firstOrSecond : 1 if the primal step is blocking,
2 if the dual step is block,
0 if no step is blocking.
Double_t FindBlockingSub(Int_t n, Double_t *w, Int_t incw, Double_t *wstep,Int_t incwstep, Double_t *u, Int_t incu, Double_t *ustep,Int_t incustep, Double_t maxStep, Double_t &w_elt,Double_t &wstep_elt, Double_t &u_elt,Double_t &ustep_elt, Int_t &fIrst_or_second)
See FindBlocking function
Double_t Violation()
The amount by which the current variables violate the non-negativity constraints.
Author: Eddy Offermann May 2004
Last update: root/quadp:$Name: $:$Id: TQpVar.cxx,v 1.11 2006/06/30 04:35:12 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.