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-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 #include "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  return *this;
32 }
33 
35  : DVector( base )
36  , theval(base.theval)
37  , thedelta(base.thedelta)
38 {
40 }
41 
43 {
44 #ifdef ENABLE_CONSISTENCY_CHECKS
45  if (dim() != thedelta.dim())
46  return MSGinconsistent("UpdateVector");
47 
49 #else
50  return true;
51 #endif
52 }
53 } // namespace soplex
DVectorBase< Real > & operator=(const VectorBase< Real > &vec)
Assignment operator.
Definition: dvectorbase.h:155
bool isConsistent() const
Consistency check.
Definition: dvectorbase.h:302
SSVector thedelta
update vector
Definition: updatevector.h:61
bool isConsistent() const
consistency check.
Definition: ssvectorbase.h:589
Real theval
update multiplicator
Definition: updatevector.h:60
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
int dim() const
Dimension of vector.
Definition: vectorbase.h:174
Everything should be within this namespace.
UpdateVector(int p_dim, Real p_eps)
default constructor.
Definition: updatevector.h:71
int dim() const
Dimension of VectorBase.
Definition: ssvectorbase.h:532
#define MSGinconsistent(name)
Definition: spxdefines.h:121
UpdateVector & operator=(const DVector &rhs)
assignment from DVector
Definition: updatevector.h:84
bool isConsistent() const