Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
blaze
math
solvers
Lemke.h
Go to the documentation of this file.
1
//=================================================================================================
20
//=================================================================================================
21
22
#ifndef _BLAZE_MATH_SOLVERS_LEMKE_H_
23
#define _BLAZE_MATH_SOLVERS_LEMKE_H_
24
25
26
//*************************************************************************************************
27
// Includes
28
//*************************************************************************************************
29
30
#include <iosfwd>
31
#include <
blaze/math/DynamicMatrix.h
>
32
#include <
blaze/math/DynamicVector.h
>
33
#include <
blaze/math/problems/LCP.h
>
34
#include <
blaze/math/solvers/Solver.h
>
35
#include <
blaze/system/Precision.h
>
36
#include <
blaze/util/Types.h
>
37
38
39
namespace
blaze {
40
41
//=================================================================================================
42
//
43
// CLASS DEFINITION
44
//
45
//=================================================================================================
46
47
//*************************************************************************************************
53
class
Lemke
:
public
Solver
54
{
55
public
:
56
//**Constructors********************************************************************************
59
explicit
Lemke
();
61
//**********************************************************************************************
62
63
//**Solver functions****************************************************************************
66
bool
solve
(
LCP
& lcp );
67
bool
solve
(
LCP
& lcp,
const
VecN
& d );
69
//**********************************************************************************************
70
71
//**Utility functions***************************************************************************
74
void
printTableau
( std::ostream& os )
const
;
76
//**********************************************************************************************
77
78
private
:
79
//**Utility functions***************************************************************************
82
bool
isComponentwiseNonnegative
(
const
VecN
& v )
const
;
83
bool
isComponentwisePositive
(
const
VecN
& v )
const
;
84
bool
isLexicographicallyLess
(
size_t
i1,
real
f1,
size_t
i2,
real
f2 )
const
;
85
bool
isLexicographicallyGreater
(
size_t
i1,
real
f1,
size_t
i2,
real
f2 )
const
;
86
void
pivot
(
size_t
block,
size_t
drive );
88
//**********************************************************************************************
89
90
//**Member variables****************************************************************************
93
DynamicVector<ptrdiff_t>
basics_
;
94
DynamicVector<ptrdiff_t>
nonbasics_
;
95
MatMxN
M_
;
96
MatMxN
Q_
;
97
98
//**********************************************************************************************
99
};
100
//*************************************************************************************************
101
102
}
// namespace blaze
103
104
#endif
Generated on Fri May 24 2013 16:39:55 by
1.8.3.1