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 namespace soplex
28 {
29 
30 /**@brief Least squares scaling.
31  @ingroup Algo
32 
33  This SPxScaler implementation performs least squares scaling as suggested by Curtis and Reid in:
34  On the Automatic Scaling of Matrices for Gaussian Elimination (1972).
35 */
36 class SPxLeastSqSC : public SPxScaler
37 {
38 public:
39 
40  //-------------------------------------
41  /**@name Construction / destruction */
42  //@{
43  /// default constructor (this scaler makes no use of inherited member m_colFirst)
44  explicit SPxLeastSqSC();
45  /// copy constructor
46  SPxLeastSqSC(const SPxLeastSqSC& old);
47  /// assignment operator
49  /// destructor
50  virtual ~SPxLeastSqSC()
51  {}
52  /// clone function for polymorphism
53  inline virtual SPxScaler* clone() const
54  {
55  return new SPxLeastSqSC(*this);
56  }
57  //@}
58 
59  //-------------------------------------
60  /**@name Access / modification */
61  //@{
62  /// set real param (conjugate gradient accuracy)
63  virtual void setRealParam(Real param, const char* name);
64  /// set int param (maximal conjugate gradient rounds)
65  virtual void setIntParam(int param, const char* name);
66  //@}
67 
68  //-------------------------------------
69  /**@name Scaling */
70  //@{
71  /// Scale the loaded SPxLP.
72  virtual void scale(SPxLP& lp, bool persistent = true);
73 
74 
75 protected:
76  Real acrcydivisor = 1000.0;
77  int maxrounds = 20;
78 
79 };
80 } // namespace soplex
81 #endif // _SPXLEASTSQSC_H_
virtual SPxScaler * clone() const
clone function for polymorphism
Definition: spxleastsqsc.h:53
Least squares scaling.This SPxScaler implementation performs least squares scaling as suggested by Cu...
Definition: spxleastsqsc.h:36
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:218
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:76
virtual ~SPxLeastSqSC()
destructor
Definition: spxleastsqsc.h:50