Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

column.h
Go to the documentation of this file.
1 
30 #pragma once
31 
33 
34 namespace abacus {
35 
37 
47 class OGDF_EXPORT Column : public SparVec {
48 public:
49 
51 
61  double obj,
62  double lb,
63  double ub,
64  int nnz,
65  Array<int> &s,
66  Array<double> &c)
67  : SparVec(glob, nnz, s, c), obj_(obj), lBound_(lb), uBound_(ub) { }
68 
70 
74  Column(AbacusGlobal *glob, int maxNnz) : SparVec(glob, maxNnz) { }
75 
77 
85  double obj,
86  double lb,
87  double ub,
88  SparVec &vec)
89  : SparVec(vec), obj_(obj), lBound_(lb), uBound_(ub) { }
90 
91  ~Column() { }
92 
94 
100  friend OGDF_EXPORT ostream& operator<<(ostream &out, const Column &rhs);
101 
103  double obj() const { return obj_; }
104 
105 
107 
110  void obj(double c) { obj_ = c; }
111 
112 
114  double lBound() const { return lBound_; }
115 
116 
118 
121  void lBound(double l) { lBound_ = l; }
122 
123 
125  double uBound() const { return uBound_; }
126 
127 
129 
132  void uBound(double u) { uBound_ = u; }
133 
134 
136 
142  void copy(const Column &col);
143 
144 private:
145 
146  double obj_;
147  double lBound_;
148  double uBound_;
149 };
150 
151 } //namespace abacus
double lBound() const
Returns the lower bound of the column.
Definition: column.h:114
Sparse vectors.
Definition: sparvec.h:47
double obj_
The objective function coefficient of the column.
Definition: column.h:146
Global data and functions.
Definition: global.h:57
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void obj(double c)
Sets the objective function coefficient of the column to c.
Definition: column.h:110
Column(AbacusGlobal *glob, double obj, double lb, double ub, int nnz, Array< int > &s, Array< double > &c)
Creates and initializes a column.
Definition: column.h:60
Representation of variables in column format.
Definition: column.h:47
void uBound(double u)
Sets the upper bound of the column to u.
Definition: column.h:132
Column(AbacusGlobal *glob, double obj, double lb, double ub, SparVec &vec)
Creates a column initialized by a sparse vector vec.
Definition: column.h:84
double obj() const
Returns the objective function coefficient of the column.
Definition: column.h:103
double uBound() const
Returns the upper bound of the column.
Definition: column.h:125
static void copy(const T &from, T &to)
Definition: Alg.h:61
Column(AbacusGlobal *glob, int maxNnz)
Creates an uninitialized column.
Definition: column.h:74
sparse vector.
double uBound_
The upper bound of the column.
Definition: column.h:148
ostream & operator<<(ostream &out, const Active< BaseType, CoType > &rhs)
double lBound_
The lower bound of the column.
Definition: column.h:147
void lBound(double l)
Sets the lower bound of the column to l.
Definition: column.h:121