Scippy

SoPlex

Sequential object-oriented simPlex

spxsumst.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-2016 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 
17 /**@file spxsumst.h
18  * @brief Simple heuristic SPxStarter.
19  */
20 #ifndef _SPXSUMST_H_
21 #define _SPXSUMST_H_
22 
23 
24 #include <assert.h>
25 
26 #include "spxvectorst.h"
27 
28 namespace soplex
29 {
30 
31 /**@brief Simple heuristic SPxStarter.
32  @ingroup Algo
33 
34  Testing version of an SPxVectorST using a very simplistic heuristic to
35  build up an approximated solution vector.
36 */
37 class SPxSumST : public SPxVectorST
38 {
39 protected:
40 
41  //-------------------------------------
42  /**@name Protected helpers */
43  //@{
44  /// sets up variable weights.
45  void setupWeights(SPxSolver& base);
46  //@}
47 
48 public:
49 
50  //-------------------------------------
51  /**@name Construction / destruction */
52  //@{
53  /// default constructor.
55  {
56  m_name = "Sum";
57  }
58  /// copy constructor
59  SPxSumST( const SPxSumST& old)
60  : SPxVectorST(old)
61  {
62  assert(isConsistent());
63  }
64  /// assignment operator
65  SPxSumST& operator=( const SPxSumST& rhs)
66  {
67  if(this != &rhs)
68  {
70 
71  assert(isConsistent());
72  }
73 
74  return *this;
75  }
76  /// destructor.
77  virtual ~SPxSumST()
78  {}
79  /// clone function for polymorphism
80  inline virtual SPxStarter* clone() const
81  {
82  return new SPxSumST(*this);
83  }
84  //@}
85 
86 };
87 
88 } // namespace soplex
89 #endif // _SPXSUMST_H_
SPxSumST & operator=(const SPxSumST &rhs)
assignment operator
Definition: spxsumst.h:65
Solution vector based start basis.
SoPlex start basis generation base class.SPxStarter is the virtual base class for classes generating ...
Definition: spxstarter.h:41
virtual SPxStarter * clone() const
clone function for polymorphism
Definition: spxsumst.h:80
const char * m_name
name of the starter
Definition: spxstarter.h:49
virtual ~SPxSumST()
destructor.
Definition: spxsumst.h:77
void setupWeights(SPxSolver &base)
sets up variable weights.
Definition: spxsumst.cpp:25
virtual bool isConsistent() const
consistency check.
Definition: spxweightst.cpp:31
Solution vector based start basis.This version of SPxWeightST can be used to construct a starting bas...
Definition: spxvectorst.h:44
Sequential object-oriented SimPlex.SPxSolver is an LP solver class using the revised Simplex algorith...
Definition: spxsolver.h:84
Everything should be within this namespace.
SPxSumST()
default constructor.
Definition: spxsumst.h:54
SPxSumST(const SPxSumST &old)
copy constructor
Definition: spxsumst.h:59
Simple heuristic SPxStarter.Testing version of an SPxVectorST using a very simplistic heuristic to bu...
Definition: spxsumst.h:37
SPxVectorST & operator=(const SPxVectorST &rhs)
assignment operator
Definition: spxvectorst.h:91