Scippy

SoPlex

Sequential object-oriented simPlex

spxleastsqsc.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-2017 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 spxleastsqsc.h
17  * @brief LP least squares scaling.
18  */
19 #ifndef _SPXLEASTSQSC_H_
20 #define _SPXLEASTSQSC_H_
21 
22 #include <assert.h>
23 #include "spxsolver.h"
24 #include "spxscaler.h"
25 #include "spxlp.h"
26 
27 #define MAX_ROUNDS 50
28 #define ACCURACY_DIVISOR 1000.0
29 
30 namespace soplex
31 {
32 /**@brief Least squares scaling.
33  @ingroup Algo
34 
35  This SPxScaler implementation performs least squares scaling as suggested by Curtis and Reid in:
36  On the Automatic Scaling of Matrices for Gaussian Elimination (1972).
37 */
38 class SPxLeastSqSC : public SPxScaler
39 {
40 public:
41 
42  //-------------------------------------
43  /**@name Construction / destruction */
44  //@{
45  /// default constructor (this scaler makes no use of inherited member m_colFirst)
46  explicit SPxLeastSqSC();
47  /// copy constructor
48  SPxLeastSqSC(const SPxLeastSqSC& old);
49  /// assignment operator
51  /// destructor
52  virtual ~SPxLeastSqSC()
53  {}
54  /// clone function for polymorphism
55  inline virtual SPxScaler* clone() const
56  {
57  return new SPxLeastSqSC(*this);
58  }
59  //@}
60 
61  //-------------------------------------
62  /**@name Access / modification */
63  //@{
64  /// set real param (conjugate gradient accuracy)
65  virtual void setRealParam(Real param, const char* name);
66  /// set int param (maximal conjugate gradient rounds)
67  virtual void setIntParam(int param, const char* name);
68  //@}
69 
70  //-------------------------------------
71  /**@name Scaling */
72  //@{
73  /// Scale the loaded SPxLP.
74  virtual void scale(SPxLP& lp, bool persistent = true);
75 
76 
77 protected:
79  int maxrounds;
80 
81 };
82 } // namespace soplex
83 #endif // _SPXLEASTSQSC_H_
virtual SPxScaler * clone() const
clone function for polymorphism
Definition: spxleastsqsc.h:55
Least squares scaling.This SPxScaler implementation performs least squares scaling as suggested by Cu...
Definition: spxleastsqsc.h:38
SPxLeastSqSC()
default constructor (this scaler makes no use of inherited member m_colFirst)
virtual void scale(SPxLP &lp, bool persistent=true)
Scale the loaded SPxLP.
double Real
Definition: spxdefines.h:215
main LP solver class
virtual void setIntParam(int param, const char *name)
set int param (maximal conjugate gradient rounds)
Everything should be within this namespace.
SPxLeastSqSC & operator=(const SPxLeastSqSC &)
assignment operator
LP scaling base class.
Saving LPs in a form suitable for SoPlex.
virtual void setRealParam(Real param, const char *name)
set real param (conjugate gradient accuracy)
LP scaler abstract base class.Instances of classes derived from SPxScaler may be loaded to SoPlex in ...
Definition: spxscaler.h:75
virtual ~SPxLeastSqSC()
destructor
Definition: spxleastsqsc.h:52