43 #include "Riostream.h" 196 if (componentNorm > norm) norm = componentNorm;
199 componentNorm = (fQ_abs.
Abs()).Max();
200 if (componentNorm > norm) norm = componentNorm;
203 if (componentNorm > norm) norm = componentNorm;
206 componentNorm = (fA_abs.
Abs()).Max();
207 if (componentNorm > norm) norm = componentNorm;
210 componentNorm = (fC_abs.
Abs()).Max();
211 if (componentNorm > norm) norm = componentNorm;
215 if (componentNorm > norm) norm = componentNorm;
219 if (componentNorm > norm) norm = componentNorm;
223 if (componentNorm > norm) norm = componentNorm;
227 if (componentNorm > norm) norm = componentNorm;
306 this->
Qmult(1.0,tmp,0.5,vars->
fX);
317 Double_t ix = 3074.20374;
358 if (
this != &source) {
virtual void Print(Option_t *opt="") const
Print class members.
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
TQpDataBase & operator=(const TQpDataBase &source)
Assignment operator.
virtual void PutQIntoAt(TMatrixDBase &M, Int_t row, Int_t col)
Insert the Hessian Q into the matrix M at index (row,col) for the fundamental linear system...
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.
Element NormInf() const
Compute the infinity-norm of the vector MAX{ |v[i]| }.
void Print(Option_t *option="") const
Print the vector as a list of elements.
you should not use this method at all Int_t y
virtual void ATransmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x)
calculate y = beta*y + alpha*(fA^T*x)
double beta(double x, double y)
Calculates the beta function.
void Randomize(Element alpha, Element beta, Double_t &seed)
randomize vector elements value
Int_t GetNoElements() const
virtual void PutCIntoAt(TMatrixDBase &M, Int_t row, Int_t col)
Insert the constraint matrix C into the matrix M at index (row,col) for the fundamental linear system...
virtual void DataRandom(TVectorD &x, TVectorD &y, TVectorD &z, TVectorD &s)
Choose randomly a QP problem.
virtual TMatrixTBase< Element > & Randomize(Element alpha, Element beta, Double_t &seed)
randomize matrix element values
virtual TMatrixTSparse< Element > & RandomizePD(Element alpha, Element beta, Double_t &seed)
randomize matrix element values but keep matrix symmetric positive definite
TMatrixTSparse< Double_t > TMatrixDSparse
void SetNonZeros(Int_t nnzQ, Int_t nnzA, Int_t nnzC)
Allocate space for the appropriate number of non-zeros in the matrices.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t Int_t m
virtual TMatrixTBase< Element > & SetSub(Int_t row_lwb, Int_t col_lwb, const TMatrixTBase< Element > &source)=0
virtual Double_t ObjectiveValue(TQpVar *vars)
Return value of the objective function.
virtual Double_t DataNorm()
Return the largest component of several vectors in the data class.
TMatrixTSparse< Element > & SetSparseIndex(Int_t nelem_new)
Increase/decrease the number of non-zero elements to nelems_new.
virtual void Amult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x)
calculate y = beta*y + alpha*(fA*x)
* x
Deprecated and error prone model selection interface.
TVectorT< Element > & SelectNonZeros(const TVectorT< Element > &select)
Keep only element as selected through array select non-zero.
virtual void CTransmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x)
calculate y = beta*y + alpha*(fC^T*x)
TMatrixTSparse< Element > & Use(Int_t row_lwb, Int_t row_upb, Int_t col_lwb, Int_t col_upb, Int_t nr_nonzeros, Int_t *pRowIndex, Int_t *pColIndex, Element *pData)
virtual void GetDiagonalOfQ(TVectorD &dQ)
Return in vector dq the diagonal of matrix fQ.
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.
void Print(Option_t *name="") const
Print the matrix as a table of elements.
you should not use this method at all Int_t Int_t z
TQpDataSparse & operator=(const TQpDataSparse &source)
Assignment operator.
virtual void PutAIntoAt(TMatrixDBase &M, Int_t row, Int_t col)
Insert the constraint matrix A into the matrix M at index (row,col) for the fundamental linear system...
virtual TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t nr_nonzeros=-1)
Set size of the matrix to nrows x ncols with nr_nonzeros non-zero entries if nr_nonzeros > 0 ...
virtual void Qmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x)
calculate y = beta*y + alpha*(fQ*x)
Bool_t MatchesNonZeroPattern(const TVectorT< Element > &select)
Check if vector elements as selected through array select are non-zero.
virtual TMatrixTBase< Element > & Abs()
Take an absolute value of a matrix, i.e. apply Abs() to each element.
TMatrixTSparseDiag< Double_t > TMatrixDSparseDiag
virtual void Cmult(Double_t beta, TVectorD &y, Double_t alpha, const TVectorD &x)
calculate y = beta*y + alpha*(fC*x)