Logo ROOT   6.07/09
Reference Guide
TQpProbSparse.h
Go to the documentation of this file.
1 // @(#)root/quadp:$Id$
2 // Author: Eddy Offermann May 2004
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /*************************************************************************
13  * Parts of this file are copied from the OOQP distribution and *
14  * are subject to the following license: *
15  * *
16  * COPYRIGHT 2001 UNIVERSITY OF CHICAGO *
17  * *
18  * The copyright holder hereby grants you royalty-free rights to use, *
19  * reproduce, prepare derivative works, and to redistribute this software*
20  * to others, provided that any changes are clearly documented. This *
21  * software was authored by: *
22  * *
23  * E. MICHAEL GERTZ gertz@mcs.anl.gov *
24  * Mathematics and Computer Science Division *
25  * Argonne National Laboratory *
26  * 9700 S. Cass Avenue *
27  * Argonne, IL 60439-4844 *
28  * *
29  * STEPHEN J. WRIGHT swright@cs.wisc.edu *
30  * Computer Sciences Department *
31  * University of Wisconsin *
32  * 1210 West Dayton Street *
33  * Madison, WI 53706 FAX: (608)262-9777 *
34  * *
35  * Any questions or comments may be directed to one of the authors. *
36  * *
37  * ARGONNE NATIONAL LABORATORY (ANL), WITH FACILITIES IN THE STATES OF *
38  * ILLINOIS AND IDAHO, IS OWNED BY THE UNITED STATES GOVERNMENT, AND *
39  * OPERATED BY THE UNIVERSITY OF CHICAGO UNDER PROVISION OF A CONTRACT *
40  * WITH THE DEPARTMENT OF ENERGY. *
41  *************************************************************************/
42 
43 #ifndef ROOT_TQpProbSparse
44 #define ROOT_TQpProbSparse
45 
46 #include "TQpProbBase.h"
47 #ifndef ROOT_TQpDataSparse
48 #include "TQpDataSparse.h"
49 #endif
50 #ifndef ROOT_TQpVars
51 #include "TQpVar.h"
52 #endif
53 
54 //////////////////////////////////////////////////////////////////////////
55 // //
56 // TQpProbSparse //
57 // //
58 // sparse matrix problem formulation //
59 // //
60 //////////////////////////////////////////////////////////////////////////
61 
62 class TQpProbSparse : public TQpProbBase
63 {
64 
65 public:
66 
69  TQpProbSparse(const TQpProbSparse &another);
70 
71  virtual ~TQpProbSparse() {}
72 
73 #ifndef __CINT__
74  virtual TQpDataBase *MakeData (Double_t *c,
75  Int_t nnzQ,Int_t *irowQ,Int_t *icolQ,Double_t *Q,
76  Double_t *xlo,Bool_t *ixlo,
77  Double_t *xup,Bool_t *ixup,
78  Int_t nnzA,Int_t *irowA,Int_t *icolA,Double_t *A,
79  Double_t *bA,
80  Int_t nnzC,Int_t *irowC,Int_t *icolC,Double_t *C,
81  Double_t *clo,Bool_t *iclo,
82  Double_t *cup,Bool_t *icup);
83 #endif
84  virtual TQpDataBase *MakeData (TVectorD &c,
85  TMatrixDBase &Q_in,
86  TVectorD &xlo, TVectorD &ixlo,
87  TVectorD &xup, TVectorD &ixup,
88  TMatrixDBase &A_in,TVectorD &bA,
89  TMatrixDBase &C_in,
90  TVectorD &clo, TVectorD &iclo,
91  TVectorD &cup, TVectorD &icup);
92  virtual TQpResidual *MakeResiduals(const TQpDataBase *data);
93  virtual TQpVar *MakeVariables(const TQpDataBase *data);
94  virtual TQpLinSolverBase *MakeLinSys (const TQpDataBase *data);
95 
96  virtual void JoinRHS (TVectorD &rhs_in,TVectorD &rhs1_in,TVectorD &rhs2_in,TVectorD &rhs3_in);
97  virtual void SeparateVars (TVectorD &x_in,TVectorD &y_in,TVectorD &z_in,TVectorD &vars_in);
98  void MakeRandomData(TQpDataSparse *&data,TQpVar *&soln,Int_t nnzQ,Int_t nnzA,Int_t nnzC);
99 
100  TQpProbSparse &operator=(const TQpProbSparse &source);
101 
102  ClassDef(TQpProbSparse,1) // Qp sparse problem formulation class
103 };
104 #endif
const int nx
Definition: kalman.C:16
virtual TQpVar * MakeVariables(const TQpDataBase *data)
Setup the variables.
return c
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
static double A[]
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void SeparateVars(TVectorD &x_in, TVectorD &y_in, TVectorD &z_in, TVectorD &vars_in)
Extracts three component vectors from a given aggregated vector.
void MakeRandomData(TQpDataSparse *&data, TQpVar *&soln, Int_t nnzQ, Int_t nnzA, Int_t nnzC)
Create a random QP problem.
virtual TQpLinSolverBase * MakeLinSys(const TQpDataBase *data)
Setup the linear solver.
static double C[]
virtual TQpResidual * MakeResiduals(const TQpDataBase *data)
Setup the residuals.
virtual ~TQpProbSparse()
Definition: TQpProbSparse.h:71
Linear Algebra Package.
double Double_t
Definition: RtypesCore.h:55
TQpProbSparse & operator=(const TQpProbSparse &source)
Assignment operator.
virtual TQpDataBase * MakeData(Double_t *c, Int_t nnzQ, Int_t *irowQ, Int_t *icolQ, Double_t *Q, Double_t *xlo, Bool_t *ixlo, Double_t *xup, Bool_t *ixup, Int_t nnzA, Int_t *irowA, Int_t *icolA, Double_t *A, Double_t *bA, Int_t nnzC, Int_t *irowC, Int_t *icolC, Double_t *C, Double_t *clo, Bool_t *iclo, Double_t *cup, Bool_t *icup)
Setup the data.
Definition: TQpVar.h:65
virtual void JoinRHS(TVectorD &rhs_in, TVectorD &rhs1_in, TVectorD &rhs2_in, TVectorD &rhs3_in)
Assembles a single vector object from three given vectors .
static double Q[]