178 if (componentNorm > norm) norm = componentNorm;
181 componentNorm = (fQ_abs.
Abs()).Max();
182 if (componentNorm > norm) norm = componentNorm;
185 if (componentNorm > norm) norm = componentNorm;
188 componentNorm = (fA_abs.
Abs()).Max();
189 if (componentNorm > norm) norm = componentNorm;
192 componentNorm = (fC_abs.
Abs()).Max();
193 if (componentNorm > norm) norm = componentNorm;
197 if (componentNorm > norm) norm = componentNorm;
201 if (componentNorm > norm) norm = componentNorm;
205 if (componentNorm > norm) norm = componentNorm;
209 if (componentNorm > norm) norm = componentNorm;
247 m.SetSub(row,col,
fQ);
257 m.SetSub(row,col,
fA);
267 m.SetSub(row,col,
fC);
288 this->
Qmult(1.0,tmp,0.5,vars->
fX);
309 y .Randomize(-10.0,10.0,ix);
337 if (
this != &source) {
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
TMatrixTDiag< Double_t > TMatrixDDiag
TMatrixT< Double_t > TMatrixD
virtual TMatrixTBase< Element > & Randomize(Element alpha, Element beta, Double_t &seed)
Randomize matrix element values.
void Print(Option_t *name="") const override
Print the matrix as a table of elements.
Int_t GetNoElements() const
virtual TMatrixTBase< Element > & Abs()
Take an absolute value of a matrix, i.e. apply Abs() to each element.
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
virtual TMatrixTSym< Element > & RandomizePD(Element alpha, Element beta, Double_t &seed)
randomize matrix element values but keep matrix symmetric positive definite
TMatrixTSym< Element > & Use(Int_t row_lwb, Int_t row_upb, Element *data)
TMatrixT< Element > & Use(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Element *data)
Use the array data to fill the matrix ([row_lwb..row_upb] x [col_lwb..col_upb])
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
Data for the general QP formulation.
TQpDataBase & operator=(const TQpDataBase &source)
Assignment operator.
static void RandomlyChooseBoundedVariables(TVectorD &x, TVectorD &dualx, TVectorD &blx, TVectorD &ixlow, TVectorD &bux, TVectorD &ixupp, Double_t &ix, Double_t percentLowerOnly, Double_t percentUpperOnly, Double_t percentBound)
Randomly choose x and its boundaries.
Data for the dense QP formulation.
Double_t DataNorm() override
Return the largest component of several vectors in the data class.
void Qmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x) override
calculate y = beta*y + alpha*(fQ*x)
void Cmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x) override
calculate y = beta*y + alpha*(fC*x)
void GetDiagonalOfQ(TVectorD &dQ) override
Return in vector dq the diagonal of matrix fQ (Quadratic part of Objective function)
void DataRandom(TVectorD &x, TVectorD &y, TVectorD &z, TVectorD &s) override
Choose randomly a QP problem.
void Amult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x) override
calculate y = beta*y + alpha*(fA*x)
Double_t ObjectiveValue(TQpVar *vars) override
Return value of the objective function.
void PutCIntoAt(TMatrixDBase &M, Int_t row, Int_t col) override
Insert the constraint matrix C into the matrix M at index (row,col) for the fundamental linear system...
void Print(Option_t *opt="") const override
Print all class members.
void PutQIntoAt(TMatrixDBase &M, Int_t row, Int_t col) override
Insert the Hessian Q into the matrix M at index (row,col) for the fundamental linear system.
void PutAIntoAt(TMatrixDBase &M, Int_t row, Int_t col) override
Insert the constraint matrix A into the matrix M at index (row,col) for the fundamental linear system...
void ATransmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x) override
calculate y = beta*y + alpha*(fA^T*x)
TQpDataDens & operator=(const TQpDataDens &source)
Assignment operator.
void CTransmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x) override
calculate y = beta*y + alpha*(fC^T*x)
Class containing the variables for the general QP formulation.
Element NormInf() const
Compute the infinity-norm of the vector MAX{ |v[i]| }.
Bool_t MatchesNonZeroPattern(const TVectorT< Element > &select)
Check if vector elements as selected through array select are non-zero.
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
TVectorT< Element > & SelectNonZeros(const TVectorT< Element > &select)
Keep only element as selected through array select non-zero.
void Print(Option_t *option="") const override
Print the vector as a list of elements.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.