Scippy

SoPlex

Sequential object-oriented simPlex

updatevector.cpp
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 #include "soplex/updatevector.h"
17 
18 namespace soplex
19 {
20 
22 {
23  if(this != &rhs)
24  {
25  theval = rhs.theval;
26  thedelta = rhs.thedelta;
27  DVector::operator=(rhs);
28 
30  }
31 
32  return *this;
33 }
34 
36  : DVector(base)
37  , theval(base.theval)
38  , thedelta(base.thedelta)
39 {
41 }
42 
44 {
45 #ifdef ENABLE_CONSISTENCY_CHECKS
46 
47  if(dim() != thedelta.dim())
48  return MSGinconsistent("UpdateVector");
49 
51 #else
52  return true;
53 #endif
54 }
55 } // namespace soplex
DVectorBase< Real > & operator=(const VectorBase< Real > &vec)
Assignment operator.
Definition: dvectorbase.h:159
bool isConsistent() const
Consistency check.
Definition: dvectorbase.h:307
SSVector thedelta
update vector
Definition: updatevector.h:61
Real theval
update multiplicator
Definition: updatevector.h:60
int dim() const
Dimension of VectorBase.
Definition: ssvectorbase.h:563
Dense vector with semi-sparse vector for updates.
Dense vector with semi-sparse vector for updatesIn many algorithms vectors are updated in every itera...
Definition: updatevector.h:53
bool isConsistent() const
consistency check.
Definition: ssvectorbase.h:620
int dim() const
Dimension of vector.
Definition: vectorbase.h:217
Everything should be within this namespace.
UpdateVector(int p_dim, Real p_eps)
default constructor.
Definition: updatevector.h:71
bool isConsistent() const
#define MSGinconsistent(name)
Definition: spxdefines.h:126
UpdateVector & operator=(const DVector &rhs)
assignment from DVector
Definition: updatevector.h:84