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-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file spxdefaultrt.h
26 * @brief Textbook ratio test for SoPlex.
27 */
28#ifndef _SPXDEFAULTRT_H_
29#define _SPXDEFAULTRT_H_
30
31
32#include <assert.h>
33
34#include "soplex/spxdefines.h"
36
37namespace soplex
38{
39
40/**@brief Textbook ratio test for SoPlex.
41 @ingroup Algo
42
43 Class SPxDefaultRT provides an implementation of the textbook ratio test
44 as a derived class of SPxRatioTester. This class is not intended for
45 reliably solving LPs (even though it does the job for ``numerically simple''
46 LPs). Instead, it should serve as a demonstration of how to write ratio
47 tester classes.
48
49 See SPxRatioTester for a class documentation.
50*/
51template <class R>
53{
54public:
55
56 //-------------------------------------
57 /**@name Construction / destruction */
58 ///@{
59 /// default constructor
61 : SPxRatioTester<R>("Default")
62 {}
63 /// copy constructor
65 : SPxRatioTester<R>(old)
66 {}
67 /// assignment operator
69 {
70 if(this != &rhs)
71 {
73 }
74
75 return *this;
76 }
77 /// destructor
78 virtual ~SPxDefaultRT()
79 {}
80 /// clone function for polymorphism
81 inline virtual SPxRatioTester<R>* clone() const
82 {
83 return new SPxDefaultRT(*this);
84 }
85 ///@}
86
87 //-------------------------------------
88 /**@name Select enter/leave */
89 ///@{
90 ///
91 virtual int selectLeave(R& val, R, bool);
92 ///
93 virtual SPxId selectEnter(R& val, int, bool);
94};
95
96} // namespace soplex
97
98#include "spxdefaultrt.hpp"
99
100#endif // _SPXDEFAULTRT_H_
Textbook ratio test for SoPlex.
Definition: spxdefaultrt.h:53
virtual SPxRatioTester< R > * clone() const
clone function for polymorphism
Definition: spxdefaultrt.h:81
virtual ~SPxDefaultRT()
destructor
Definition: spxdefaultrt.h:78
SPxDefaultRT(const SPxDefaultRT &old)
copy constructor
Definition: spxdefaultrt.h:64
SPxDefaultRT & operator=(const SPxDefaultRT &rhs)
assignment operator
Definition: spxdefaultrt.h:68
virtual SPxId selectEnter(R &val, int, bool)
virtual int selectLeave(R &val, R, bool)
SPxDefaultRT()
default constructor
Definition: spxdefaultrt.h:60
Generic Ids for LP rows or columns.
Definition: spxid.h:95
Abstract ratio test base class.
SPxRatioTester & operator=(const SPxRatioTester &rhs)
assignment operator
Everything should be within this namespace.
Debugging, floating point type and parameter definitions.
Abstract ratio test base class.