Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:22

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_TQpProbSparse
0044 #define ROOT_TQpProbSparse
0045 
0046 #include "TQpProbBase.h"
0047 #include "TQpDataSparse.h"
0048 #include "TQpVar.h"
0049 
0050 //////////////////////////////////////////////////////////////////////////
0051 //                                                                      //
0052 // TQpProbSparse                                                        //
0053 //                                                                      //
0054 // sparse matrix problem formulation                                    //
0055 //                                                                      //
0056 //////////////////////////////////////////////////////////////////////////
0057 
0058 class TQpProbSparse : public TQpProbBase
0059 {
0060 
0061 public:
0062 
0063    TQpProbSparse() {}
0064    TQpProbSparse(Int_t nx,Int_t my,Int_t mz);
0065    TQpProbSparse(const TQpProbSparse &another);
0066 
0067    ~TQpProbSparse() override {}
0068 
0069    virtual TQpDataBase      *MakeData      (Double_t *c,
0070                                             Int_t nnzQ,Int_t *irowQ,Int_t *icolQ,Double_t *Q,
0071                                             Double_t *xlo,Bool_t *ixlo,
0072                                             Double_t *xup,Bool_t *ixup,
0073                                             Int_t nnzA,Int_t *irowA,Int_t *icolA,Double_t *A,
0074                                             Double_t *bA,
0075                                             Int_t nnzC,Int_t *irowC,Int_t *icolC,Double_t *C,
0076                                             Double_t *clo,Bool_t *iclo,
0077                                             Double_t *cup,Bool_t *icup);
0078    TQpDataBase      *MakeData     (TVectorD     &c,
0079                                             TMatrixDBase &Q_in,
0080                                             TVectorD     &xlo, TVectorD &ixlo,
0081                                             TVectorD     &xup, TVectorD &ixup,
0082                                             TMatrixDBase &A_in,TVectorD &bA,
0083                                             TMatrixDBase &C_in,
0084                                             TVectorD     &clo, TVectorD &iclo,
0085                                             TVectorD     &cup, TVectorD &icup) override;
0086    TQpResidual      *MakeResiduals(const TQpDataBase *data) override;
0087    TQpVar           *MakeVariables(const TQpDataBase *data) override;
0088    TQpLinSolverBase *MakeLinSys   (const TQpDataBase *data) override;
0089 
0090    void JoinRHS       (TVectorD &rhs_in,TVectorD &rhs1_in,TVectorD &rhs2_in,TVectorD &rhs3_in) override;
0091    void SeparateVars  (TVectorD &x_in,TVectorD &y_in,TVectorD &z_in,TVectorD &vars_in) override;
0092            void MakeRandomData(TQpDataSparse *&data,TQpVar *&soln,Int_t nnzQ,Int_t nnzA,Int_t nnzC);
0093 
0094    TQpProbSparse &operator=(const TQpProbSparse &source);
0095 
0096    ClassDefOverride(TQpProbSparse,1)                   // Qp sparse problem formulation class
0097 };
0098 #endif