Scippy

SoPlex

Sequential object-oriented simPlex

spxequilisc.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-2019 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 spxequilisc.h
17  * @brief LP equilibrium scaling.
18  */
19 #ifndef _SPXEQUILISC_H_
20 #define _SPXEQUILISC_H_
21 
22 #include <assert.h>
23 
24 #include "soplex/spxdefines.h"
25 #include "soplex/spxscaler.h"
26 
27 namespace soplex
28 {
29 /**@brief Equilibrium row/column scaling.
30  @ingroup Algo
31 
32  This SPxScaler implementation performs equilibrium scaling of the
33  LPs rows and columns.
34 */
35 class SPxEquiliSC : public SPxScaler
36 {
37 public:
38  /// compute equilibrium scaling vector rounded to power of two
39  static void computeEquiExpVec(const SVSet* vecset, const DataArray<int>& coScaleExp,
40  DataArray<int>& scaleExp);
41 
42  /// compute equilibrium scaling vector rounded to power of two
43  static void computeEquiExpVec(const SVSet* vecset, const std::vector<Real>& coScaleVal,
44  DataArray<int>& scaleExp);
45 
46  /// compute equilibrium scaling rounded to power of 2 for existing Real scaling factors (preRowscale, preColscale)
47  static void computePostequiExpVecs(const SPxLPBase<Real>& lp, const std::vector<Real>& preRowscale,
48  const std::vector<Real>& preColscale,
49  DataArray<int>& rowscaleExp, DataArray<int>& colscaleExp);
50  //-------------------------------------
51  /**@name Construction / destruction */
52  //@{
53  /// default constructor (this scaler makes no use of inherited member m_colFirst)
54  explicit SPxEquiliSC(bool doBoth = true);
55  /// copy constructor
56  SPxEquiliSC(const SPxEquiliSC& old);
57  /// assignment operator
59  /// destructor
60  virtual ~SPxEquiliSC()
61  {}
62  /// clone function for polymorphism
63  inline virtual SPxScaler* clone() const override
64  {
65  return new SPxEquiliSC(*this);
66  }
67  //@}
68 
69  //-------------------------------------
70  /**@name Scaling */
71  //@{
72  /// Scale the loaded SPxLP.
73  virtual void scale(SPxLPBase<Real>& lp, bool persistent = false) override;
74  //@}
75 };
76 } // namespace soplex
77 #endif // _SPXEQUILISC_H_
virtual SPxScaler * clone() const override
clone function for polymorphism
Definition: spxequilisc.h:63
SPxEquiliSC(bool doBoth=true)
default constructor (this scaler makes no use of inherited member m_colFirst)
virtual ~SPxEquiliSC()
destructor
Definition: spxequilisc.h:60
Debugging, floating point type and parameter definitions.
static void computePostequiExpVecs(const SPxLPBase< Real > &lp, const std::vector< Real > &preRowscale, const std::vector< Real > &preColscale, DataArray< int > &rowscaleExp, DataArray< int > &colscaleExp)
compute equilibrium scaling rounded to power of 2 for existing Real scaling factors (preRowscale...
Everything should be within this namespace.
static void computeEquiExpVec(const SVSet *vecset, const DataArray< int > &coScaleExp, DataArray< int > &scaleExp)
compute equilibrium scaling vector rounded to power of two
Definition: spxequilisc.cpp:74
LP scaling base class.
virtual void scale(SPxLPBase< Real > &lp, bool persistent=false) override
Scale the loaded SPxLP.
LP scaler abstract base class.Instances of classes derived from SPxScaler may be loaded to SoPlex in ...
Definition: spxscaler.h:76
SPxEquiliSC & operator=(const SPxEquiliSC &)
assignment operator
Equilibrium row/column scaling.This SPxScaler implementation performs equilibrium scaling of the LPs ...
Definition: spxequilisc.h:35