All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Lemke.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SOLVERS_LEMKE_H_
36 #define _BLAZE_MATH_SOLVERS_LEMKE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iosfwd>
48 #include <blaze/system/Precision.h>
49 #include <blaze/util/Types.h>
50 
51 
52 namespace blaze {
53 
54 //=================================================================================================
55 //
56 // CLASS DEFINITION
57 //
58 //=================================================================================================
59 
60 //*************************************************************************************************
66 class Lemke : public Solver
67 {
68  public:
69  //**Constructors********************************************************************************
72  explicit Lemke();
74  //**********************************************************************************************
75 
76  //**Solver functions****************************************************************************
79  bool solve( LCP& lcp );
80  bool solve( LCP& lcp, const VecN& d );
82  //**********************************************************************************************
83 
84  //**Utility functions***************************************************************************
87  void printTableau( std::ostream& os ) const;
89  //**********************************************************************************************
90 
91  private:
92  //**Utility functions***************************************************************************
95  bool isComponentwiseNonnegative( const VecN& v ) const;
96  bool isComponentwisePositive ( const VecN& v ) const;
97  bool isLexicographicallyLess ( size_t i1, real f1, size_t i2, real f2 ) const;
98  bool isLexicographicallyGreater( size_t i1, real f1, size_t i2, real f2 ) const;
99  void pivot ( size_t block, size_t drive );
101  //**********************************************************************************************
102 
103  //**Member variables****************************************************************************
110 
111  //**********************************************************************************************
112 };
113 //*************************************************************************************************
114 
115 } // namespace blaze
116 
117 #endif
DynamicVector< ptrdiff_t > nonbasics_
TODO.
Definition: Lemke.h:107
bool solve(LCP &lcp)
TODO.
Definition: Lemke.cpp:90
Header file for the floating point precision of the Blaze library.
bool isComponentwiseNonnegative(const VecN &v) const
TODO.
Definition: Lemke.cpp:328
bool isLexicographicallyGreater(size_t i1, real f1, size_t i2, real f2) const
TODO.
Definition: Lemke.cpp:395
MatMxN Q_
TODO.
Definition: Lemke.h:109
The Lemke pivoting algorithm for solving LCPs.TODO.
Definition: Lemke.h:66
Header file for the complete DynamicVector implementation.
bool isLexicographicallyLess(size_t i1, real f1, size_t i2, real f2) const
TODO.
Definition: Lemke.cpp:369
Header file for the base class of all solvers.
DynamicVector< ptrdiff_t > basics_
TODO.
Definition: Lemke.h:106
Header file for the complete DynamicMatrix implementation.
A data structure for linear complementarity problems.
void printTableau(std::ostream &os) const
TODO.
Definition: Lemke.cpp:480
double real
Floating point data type of the Blaze library.This type definition offers the possibility to switch t...
Definition: Precision.h:47
MatMxN M_
TODO.
Definition: Lemke.h:108
Lemke()
Default constructor for the Lemke class.
Definition: Lemke.cpp:64
Header file for basic type definitions.
bool isComponentwisePositive(const VecN &v) const
TODO.
Definition: Lemke.cpp:347
void pivot(size_t block, size_t drive)
TODO.
Definition: Lemke.cpp:419
A linear complementarity problem (LCP) data structure.The LCP class represent a linear complementarit...
Definition: LCP.h:67
Base class for all solver classes.TODO: description of the Solver class TODO: description of its func...
Definition: Solver.h:63