ROOT
6.10/00
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
#include "
TError.h
"
47
48
#include "
TQpVar.h
"
49
#include "
TQpDataBase.h
"
50
#include "
TQpResidual.h
"
51
52
#include "
TMatrixD.h
"
53
54
///////////////////////////////////////////////////////////////////////////
55
// //
56
// default general problem formulation: //
57
// //
58
// minimize c' x + ( 1/2 ) x' * Q x ; //
59
// subject to A x = b ; //
60
// clo <= C x <= cup ; //
61
// xlo <= x <= xup ; //
62
// //
63
// The general linear equality constraints must have either an upper //
64
// or lower bound, but need not have both bounds. The variables may have//
65
// no bounds; an upper bound; a lower bound or both an upper and lower //
66
// bound. //
67
// //
68
// However, for many (possibly most) QP's, the matrices in the //
69
// formulation have structure that may be exploited to solve the //
70
// problem more efficiently. This abstract problem formulation contains //
71
// a setup such that one can derive and add special formulations . //
72
// The optimality conditions of the simple QP defined above are //
73
// follows: //
74
// //
75
// rQ = c + Q * x - A' * y - C' * z = 0 //
76
// rA = A * x - b = 0 //
77
// rC = C * x - s - d = 0 //
78
// r3 = S * z = 0 //
79
// s, z >= 0 //
80
// //
81
// Where rQ, rA, rC and r3 newly defined quantities known as residual //
82
// vectors and x, y, z and s are variables of used in solution of the //
83
// QPs. //
84
// //
85
///////////////////////////////////////////////////////////////////////////
86
87
class
TQpLinSolverBase
;
88
class
TQpProbBase
:
public
TObject
89
{
90
91
public
:
92
Int_t
fNx
;
// number of elements in x
93
Int_t
fMy
;
// number of rows in A and b
94
Int_t
fMz
;
// number of rows in C
95
96
TQpProbBase
();
97
TQpProbBase
(
Int_t
nx
,
Int_t
my,
Int_t
mz);
98
TQpProbBase
(
const
TQpProbBase
&another);
99
100
virtual
~TQpProbBase
() {}
101
102
virtual
TQpDataBase
*
MakeData
(
TVectorD
&c,
103
TMatrixDBase
&Q_in,
104
TVectorD
&xlo,
TVectorD
&ixlo,
105
TVectorD
&xup,
TVectorD
&ixup,
106
TMatrixDBase
&A_in,
TVectorD
&bA,
107
TMatrixDBase
&C_in,
108
TVectorD
&clo,
TVectorD
&iclo,
109
TVectorD
&cup,
TVectorD
&icup) = 0;
110
virtual
TQpResidual
*
MakeResiduals
(
const
TQpDataBase
*
data
) = 0;
111
virtual
TQpVar
*
MakeVariables
(
const
TQpDataBase
*
data
) = 0;
112
virtual
TQpLinSolverBase
*
MakeLinSys
(
const
TQpDataBase
*
data
) = 0;
113
114
virtual
void
JoinRHS
(
TVectorD
&rhs_in,
TVectorD
&rhs1_in,
TVectorD
&rhs2_in,
TVectorD
&rhs3_in) = 0;
115
virtual
void
SeparateVars
(
TVectorD
&x_in,
TVectorD
&y_in,
TVectorD
&z_in,
TVectorD
&vars_in) = 0;
116
117
TQpProbBase
&
operator=
(
const
TQpProbBase
&source);
118
119
ClassDef
(
TQpProbBase
,1)
// Qp problem formulation base class
120
};
121
#endif
nx
const int nx
Definition:
kalman.C:16
TQpDataBase
Definition:
TQpDataBase.h:60
TQpProbBase
Definition:
TQpProbBase.h:88
TQpProbBase::MakeVariables
virtual TQpVar * MakeVariables(const TQpDataBase *data)=0
TQpResidual
Definition:
TQpResidual.h:61
TVectorT
TVectorT.
Definition:
TMatrixTBase.h:77
TQpProbBase::~TQpProbBase
virtual ~TQpProbBase()
Definition:
TQpProbBase.h:100
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:297
TQpProbBase::fNx
Int_t fNx
Definition:
TQpProbBase.h:92
TQpProbBase::fMz
Int_t fMz
Definition:
TQpProbBase.h:94
TQpVar.h
TQpProbBase::SeparateVars
virtual void SeparateVars(TVectorD &x_in, TVectorD &y_in, TVectorD &z_in, TVectorD &vars_in)=0
TQpLinSolverBase
Definition:
TQpLinSolverBase.h:66
TError.h
ApplicationClassificationKeras.data
tuple data
Definition:
ApplicationClassificationKeras.py:17
TQpProbBase::MakeLinSys
virtual TQpLinSolverBase * MakeLinSys(const TQpDataBase *data)=0
TMatrixTBase
Linear Algebra Package.
Definition:
TMatrixDBasefwd.h:25
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:93
TQpProbBase::TQpProbBase
TQpProbBase()
Default constructor.
Definition:
TQpProbBase.cxx:63
TObject
Mother of all ROOT objects.
Definition:
TObject.h:37
TMatrixD.h
TQpVar
Definition:
TQpVar.h:59
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