ROOT
6.07/01
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
math
quadp
inc
TQpProbBase.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_TQpProbBase
44
#define ROOT_TQpProbBase
45
46
#ifndef ROOT_TError
47
#include "
TError.h
"
48
#endif
49
50
#ifndef ROOT_TQpVar
51
#include "
TQpVar.h
"
52
#endif
53
#ifndef ROOT_TQpDataBase
54
#include "
TQpDataBase.h
"
55
#endif
56
#ifndef ROOT_TQpResidual
57
#include "
TQpResidual.h
"
58
#endif
59
60
#ifndef ROOT_TMatrixD
61
#include "
TMatrixD.h
"
62
#endif
63
64
///////////////////////////////////////////////////////////////////////////
65
// //
66
// default general problem formulation: //
67
// //
68
// minimize c' x + ( 1/2 ) x' * Q x ; //
69
// subject to A x = b ; //
70
// clo <= C x <= cup ; //
71
// xlo <= x <= xup ; //
72
// //
73
// The general linear equality constraints must have either an upper //
74
// or lower bound, but need not have both bounds. The variables may have//
75
// no bounds; an upper bound; a lower bound or both an upper and lower //
76
// bound. //
77
// //
78
// However, for many (possibly most) QP's, the matrices in the //
79
// formulation have structure that may be exploited to solve the //
80
// problem more efficiently. This abstract problem formulation contains //
81
// a setup such that one can derive and add special formulations . //
82
// The optimality conditions of the simple QP defined above are //
83
// follows: //
84
// //
85
// rQ = c + Q * x - A' * y - C' * z = 0 //
86
// rA = A * x - b = 0 //
87
// rC = C * x - s - d = 0 //
88
// r3 = S * z = 0 //
89
// s, z >= 0 //
90
// //
91
// Where rQ, rA, rC and r3 newly defined quantities known as residual //
92
// vectors and x, y, z and s are variables of used in solution of the //
93
// QPs. //
94
// //
95
///////////////////////////////////////////////////////////////////////////
96
97
class
TQpLinSolverBase
;
98
class
TQpProbBase
:
public
TObject
99
{
100
101
public
:
102
Int_t
fNx
;
// number of elements in x
103
Int_t
fMy
;
// number of rows in A and b
104
Int_t
fMz
;
// number of rows in C
105
106
TQpProbBase
();
107
TQpProbBase
(
Int_t
nx
,
Int_t
my,
Int_t
mz);
108
TQpProbBase
(
const
TQpProbBase
&another);
109
110
virtual
~TQpProbBase
() {}
111
112
virtual
TQpDataBase
*
MakeData
(
TVectorD
&
c
,
113
TMatrixDBase
&Q_in,
114
TVectorD
&xlo,
TVectorD
&ixlo,
115
TVectorD
&xup,
TVectorD
&ixup,
116
TMatrixDBase
&A_in,
TVectorD
&bA,
117
TMatrixDBase
&C_in,
118
TVectorD
&clo,
TVectorD
&iclo,
119
TVectorD
&cup,
TVectorD
&icup) = 0;
120
virtual
TQpResidual
*
MakeResiduals
(
const
TQpDataBase
*data) = 0;
121
virtual
TQpVar
*
MakeVariables
(
const
TQpDataBase
*data) = 0;
122
virtual
TQpLinSolverBase
*
MakeLinSys
(
const
TQpDataBase
*data) = 0;
123
124
virtual
void
JoinRHS
(
TVectorD
&rhs_in,
TVectorD
&rhs1_in,
TVectorD
&rhs2_in,
TVectorD
&rhs3_in) = 0;
125
virtual
void
SeparateVars
(
TVectorD
&x_in,
TVectorD
&y_in,
TVectorD
&z_in,
TVectorD
&vars_in) = 0;
126
127
TQpProbBase
&
operator=
(
const
TQpProbBase
&source);
128
129
ClassDef
(
TQpProbBase
,1)
// Qp problem formulation base class
130
};
131
#endif
nx
const int nx
Definition:
kalman.C:16
TQpDataBase
Definition:
TQpDataBase.h:66
TQpProbBase
Definition:
TQpProbBase.h:98
TQpProbBase::MakeVariables
virtual TQpVar * MakeVariables(const TQpDataBase *data)=0
c
return c
Definition:
entrylist_figure1.C:47
TQpResidual
Definition:
TQpResidual.h:69
TVectorT< Double_t >
TQpProbBase::~TQpProbBase
virtual ~TQpProbBase()
Definition:
TQpProbBase.h:110
TQpDataBase.h
Int_t
int Int_t
Definition:
RtypesCore.h:41
TQpProbBase::MakeResiduals
virtual TQpResidual * MakeResiduals(const TQpDataBase *data)=0
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TQpProbBase::fNx
Int_t fNx
Definition:
TQpProbBase.h:102
TQpProbBase::fMz
Int_t fMz
Definition:
TQpProbBase.h:104
TQpVar.h
TQpProbBase::SeparateVars
virtual void SeparateVars(TVectorD &x_in, TVectorD &y_in, TVectorD &z_in, TVectorD &vars_in)=0
TQpLinSolverBase
Definition:
TQpLinSolverBase.h:78
TError.h
TQpProbBase::MakeLinSys
virtual TQpLinSolverBase * MakeLinSys(const TQpDataBase *data)=0
TMatrixTBase
Definition:
TMatrixDBasefwd.h:27
TQpProbBase::JoinRHS
virtual void JoinRHS(TVectorD &rhs_in, TVectorD &rhs1_in, TVectorD &rhs2_in, TVectorD &rhs3_in)=0
TQpProbBase::fMy
Int_t fMy
Definition:
TQpProbBase.h:103
TQpProbBase::TQpProbBase
TQpProbBase()
TObject
Mother of all ROOT objects.
Definition:
TObject.h:58
TMatrixD.h
TQpVar
Definition:
TQpVar.h:65
TQpProbBase::MakeData
virtual TQpDataBase * MakeData(TVectorD &c, TMatrixDBase &Q_in, TVectorD &xlo, TVectorD &ixlo, TVectorD &xup, TVectorD &ixup, TMatrixDBase &A_in, TVectorD &bA, TMatrixDBase &C_in, TVectorD &clo, TVectorD &iclo, TVectorD &cup, TVectorD &icup)=0
TQpResidual.h
TQpProbBase::operator=
TQpProbBase & operator=(const TQpProbBase &source)
Assignment operator.
Definition:
TQpProbBase.cxx:94