Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
column.h
Go to the documentation of this file.
1
30#pragma once
31
33
34#pragma GCC visibility push(default)
35namespace abacus {
36
38
48class OGDF_EXPORT Column : public SparVec {
49public:
50
52
62 double obj,
63 double lb,
64 double ub,
65 int nnz,
66 Array<int> &s,
68 : SparVec(glob, nnz, s, c), obj_(obj), lBound_(lb), uBound_(ub) { }
69
71
75 Column(AbacusGlobal *glob, int maxNnz) : SparVec(glob, maxNnz) { }
76
78
86 double obj,
87 double lb,
88 double ub,
89 SparVec &vec)
90 : SparVec(vec), obj_(obj), lBound_(lb), uBound_(ub) { }
91
92 ~Column() { }
93
95
101 friend OGDF_EXPORT std::ostream& operator<<(std::ostream &out, const Column &rhs);
102
104 double obj() const { return obj_; }
105
106
108
111 void obj(double c) { obj_ = c; }
112
113
115 double lBound() const { return lBound_; }
116
117
119
122 void lBound(double l) { lBound_ = l; }
123
124
126 double uBound() const { return uBound_; }
127
128
130
133 void uBound(double u) { uBound_ = u; }
134
135
137
143 void copy(const Column &col);
144
145private:
146
147 double obj_;
148 double lBound_;
149 double uBound_;
150};
151
152}
153#pragma GCC visibility pop
Global data and functions.
Definition global.h:58
Representation of variables in column format.
Definition column.h:48
void uBound(double u)
Sets the upper bound of the column to u.
Definition column.h:133
void lBound(double l)
Sets the lower bound of the column to l.
Definition column.h:122
double obj_
The objective function coefficient of the column.
Definition column.h:147
double lBound_
The lower bound of the column.
Definition column.h:148
Column(AbacusGlobal *glob, double obj, double lb, double ub, SparVec &vec)
Creates a column initialized by a sparse vector vec.
Definition column.h:85
double lBound() const
Returns the lower bound of the column.
Definition column.h:115
void copy(const Column &col)
Copies column col.
void obj(double c)
Sets the objective function coefficient of the column to c.
Definition column.h:111
double uBound() const
Returns the upper bound of the column.
Definition column.h:126
Column(AbacusGlobal *glob, int maxNnz)
Creates an uninitialized column.
Definition column.h:75
double obj() const
Returns the objective function coefficient of the column.
Definition column.h:104
friend std::ostream & operator<<(std::ostream &out, const Column &rhs)
The output operator.
double uBound_
The upper bound of the column.
Definition column.h:149
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:61
Sparse vectors.
Definition sparvec.h:48
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
sparse vector.