|
||||
Warning, file /include/root/TQpDataDens.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // @(#)root/quadp:$Id$ 0002 // Author: Eddy Offermann May 2004 0003 0004 /************************************************************************* 0005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 0006 * All rights reserved. * 0007 * * 0008 * For the licensing terms see $ROOTSYS/LICENSE. * 0009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 0010 *************************************************************************/ 0011 0012 /************************************************************************* 0013 * Parts of this file are copied from the OOQP distribution and * 0014 * are subject to the following license: * 0015 * * 0016 * COPYRIGHT 2001 UNIVERSITY OF CHICAGO * 0017 * * 0018 * The copyright holder hereby grants you royalty-free rights to use, * 0019 * reproduce, prepare derivative works, and to redistribute this software* 0020 * to others, provided that any changes are clearly documented. This * 0021 * software was authored by: * 0022 * * 0023 * E. MICHAEL GERTZ gertz@mcs.anl.gov * 0024 * Mathematics and Computer Science Division * 0025 * Argonne National Laboratory * 0026 * 9700 S. Cass Avenue * 0027 * Argonne, IL 60439-4844 * 0028 * * 0029 * STEPHEN J. WRIGHT swright@cs.wisc.edu * 0030 * Computer Sciences Department * 0031 * University of Wisconsin * 0032 * 1210 West Dayton Street * 0033 * Madison, WI 53706 FAX: (608)262-9777 * 0034 * * 0035 * Any questions or comments may be directed to one of the authors. * 0036 * * 0037 * ARGONNE NATIONAL LABORATORY (ANL), WITH FACILITIES IN THE STATES OF * 0038 * ILLINOIS AND IDAHO, IS OWNED BY THE UNITED STATES GOVERNMENT, AND * 0039 * OPERATED BY THE UNIVERSITY OF CHICAGO UNDER PROVISION OF A CONTRACT * 0040 * WITH THE DEPARTMENT OF ENERGY. * 0041 *************************************************************************/ 0042 0043 #ifndef ROOT_TQpDataDens 0044 #define ROOT_TQpDataDens 0045 0046 #include "TError.h" 0047 #include "TQpDataBase.h" 0048 0049 #include "TQpVar.h" 0050 0051 #include "TMatrixD.h" 0052 #include "TMatrixDSym.h" 0053 0054 ////////////////////////////////////////////////////////////////////////// 0055 // // 0056 // TQpDataDens // 0057 // // 0058 // Data for the dense QP formulation // 0059 // // 0060 ////////////////////////////////////////////////////////////////////////// 0061 0062 class TQpDataDens : public TQpDataBase 0063 { 0064 0065 protected: 0066 0067 // these variables will be "Used" not copied 0068 TMatrixDSym fQ; // Quadratic part of Objective function 0069 TMatrixD fA; // Equality constraints 0070 TMatrixD fC; // Inequality constraints 0071 0072 public: 0073 0074 TQpDataDens() {} 0075 // data objects of the specified dimensions 0076 TQpDataDens(Int_t nx,Int_t my,Int_t mz); 0077 0078 // sets up pointers to the data objects that are passed as arguments 0079 TQpDataDens(TVectorD &c,TMatrixDSym &Q,TVectorD &xlow,TVectorD &ixlow,TVectorD &xupp, 0080 TVectorD &ixupp,TMatrixD &A,TVectorD &bA,TMatrixD &C,TVectorD &clow, 0081 TVectorD &iclow,TVectorD &cupp,TVectorD &icupp); 0082 TQpDataDens(const TQpDataDens &another); 0083 0084 ~TQpDataDens() override {} 0085 0086 void PutQIntoAt(TMatrixDBase &M,Int_t row,Int_t col) override; 0087 // insert the Hessian Q into the matrix M for the fundamental 0088 // linear system, where M is stored as a TMatrixD 0089 void PutAIntoAt(TMatrixDBase &M,Int_t row,Int_t col) override; 0090 // insert the constraint matrix A into the matrix M for the 0091 // fundamental linear system, where M is stored as a TMatrixD 0092 void PutCIntoAt(TMatrixDBase &M,Int_t row,Int_t col) override; 0093 // insert the constraint matrix C into the matrix M for the 0094 // fundamental linear system, where M is stored as a TMatrixD 0095 0096 void Qmult (Double_t beta,TVectorD& y,Double_t alpha,const TVectorD& x) override; 0097 // y = beta * y + alpha * Q * x 0098 void Amult (Double_t beta,TVectorD& y,Double_t alpha,const TVectorD& x) override; 0099 // y = beta * y + alpha * A * x 0100 void Cmult (Double_t beta,TVectorD& y,Double_t alpha,const TVectorD& x) override; 0101 // y = beta * y + alpha * C * x 0102 void ATransmult(Double_t beta,TVectorD& y,Double_t alpha,const TVectorD& x) override; 0103 // y = beta * y + alpha * A^T * x 0104 void CTransmult(Double_t beta,TVectorD& y,Double_t alpha,const TVectorD& x) override; 0105 // y = beta * y + alpha * C^T * x 0106 0107 void GetDiagonalOfQ(TVectorD &dQ) override; // extract the diagonal of Q and put it in the vector dQ 0108 0109 Double_t DataNorm() override; 0110 void DataRandom(TVectorD &x,TVectorD &y,TVectorD &z,TVectorD &s) override; 0111 // Create a random problem (x,y,z,s) 0112 // the solution to the random problem 0113 void Print(Option_t *opt="") const override; 0114 0115 Double_t ObjectiveValue(TQpVar *vars) override; 0116 0117 TQpDataDens &operator= (const TQpDataDens &source); 0118 0119 ClassDefOverride(TQpDataDens,1) // Qp Data class for Dens formulation 0120 }; 0121 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |