Scippy

SoPlex

Sequential object-oriented simPlex

spxdefaultrt.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the class library */
4 /* SoPlex --- the Sequential object-oriented simPlex. */
5 /* */
6 /* Copyright (C) 1996-2022 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file spxdefaultrt.h
17  * @brief Textbook ratio test for SoPlex.
18  */
19 #ifndef _SPXDEFAULTRT_H_
20 #define _SPXDEFAULTRT_H_
21 
22 
23 #include <assert.h>
24 
25 #include "soplex/spxdefines.h"
26 #include "soplex/spxratiotester.h"
27 
28 namespace soplex
29 {
30 
31 /**@brief Textbook ratio test for SoPlex.
32  @ingroup Algo
33 
34  Class SPxDefaultRT provides an implementation of the textbook ratio test
35  as a derived class of SPxRatioTester. This class is not intended for
36  reliably solving LPs (even though it does the job for ``numerically simple''
37  LPs). Instead, it should serve as a demonstration of how to write ratio
38  tester classes.
39 
40  See SPxRatioTester for a class documentation.
41 */
42 template <class R>
43 class SPxDefaultRT : public SPxRatioTester<R>
44 {
45 public:
46 
47  //-------------------------------------
48  /**@name Construction / destruction */
49  ///@{
50  /// default constructor
52  : SPxRatioTester<R>("Default")
53  {}
54  /// copy constructor
56  : SPxRatioTester<R>(old)
57  {}
58  /// assignment operator
60  {
61  if(this != &rhs)
62  {
64  }
65 
66  return *this;
67  }
68  /// destructor
69  virtual ~SPxDefaultRT()
70  {}
71  /// clone function for polymorphism
72  inline virtual SPxRatioTester<R>* clone() const
73  {
74  return new SPxDefaultRT(*this);
75  }
76  ///@}
77 
78  //-------------------------------------
79  /**@name Select enter/leave */
80  ///@{
81  ///
82  virtual int selectLeave(R& val, R, bool);
83  ///
84  virtual SPxId selectEnter(R& val, int, bool);
85 };
86 
87 } // namespace soplex
88 
89 #include "spxdefaultrt.hpp"
90 
91 #endif // _SPXDEFAULTRT_H_
Abstract ratio test base class.
Abstract ratio test base class.Class SPxRatioTester is the virtual base class for computing the ratio...
virtual SPxRatioTester< R > * clone() const
clone function for polymorphism
Definition: spxdefaultrt.h:72
Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: ...
Definition: spxid.h:85
virtual int selectLeave(R &val, R, bool)
SPxRatioTester & operator=(const SPxRatioTester &rhs)
assignment operator
SPxDefaultRT(const SPxDefaultRT &old)
copy constructor
Definition: spxdefaultrt.h:55
SPxDefaultRT()
default constructor
Definition: spxdefaultrt.h:51
virtual ~SPxDefaultRT()
destructor
Definition: spxdefaultrt.h:69
Debugging, floating point type and parameter definitions.
Everything should be within this namespace.
Textbook ratio test for SoPlex.Class SPxDefaultRT provides an implementation of the textbook ratio te...
Definition: spxdefaultrt.h:43
virtual SPxId selectEnter(R &val, int, bool)
SPxDefaultRT & operator=(const SPxDefaultRT &rhs)
assignment operator
Definition: spxdefaultrt.h:59