Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

column.h
Go to the documentation of this file.
1 
30 #pragma once
31 
33 
34 #pragma GCC visibility push(default)
35 namespace abacus {
36 
38 
48 class OGDF_EXPORT Column : public SparVec {
49 public:
50 
52 
62  double obj,
63  double lb,
64  double ub,
65  int nnz,
66  Array<int> &s,
67  Array<double> &c)
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 
145 private:
146 
147  double obj_;
148  double lBound_;
149  double uBound_;
150 };
151 
152 }
153 #pragma GCC visibility pop
abacus::Column::lBound_
double lBound_
The lower bound of the column.
Definition: column.h:148
abacus::operator<<
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)
abacus::Column::obj
void obj(double c)
Sets the objective function coefficient of the column to c.
Definition: column.h:111
abacus
Definition: ILPClusterPlanarity.h:50
abacus::Column::Column
Column(AbacusGlobal *glob, double obj, double lb, double ub, SparVec &vec)
Creates a column initialized by a sparse vector vec.
Definition: column.h:85
abacus::Column::obj_
double obj_
The objective function coefficient of the column.
Definition: column.h:147
Minisat::Internal::copy
static void copy(const T &from, T &to)
Definition: Alg.h:62
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:219
abacus::Column::Column
Column(AbacusGlobal *glob, int maxNnz)
Creates an uninitialized column.
Definition: column.h:75
abacus::SparVec
Sparse vectors.
Definition: sparvec.h:48
abacus::Column::lBound
void lBound(double l)
Sets the lower bound of the column to l.
Definition: column.h:122
sparvec.h
sparse vector.
abacus::Column::uBound
double uBound() const
Returns the upper bound of the column.
Definition: column.h:126
abacus::Column
Representation of variables in column format.
Definition: column.h:48
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition: config.h:117
abacus::Column::lBound
double lBound() const
Returns the lower bound of the column.
Definition: column.h:115
abacus::Column::obj
double obj() const
Returns the objective function coefficient of the column.
Definition: column.h:104
abacus::Column::~Column
~Column()
Definition: column.h:92
abacus::Column::Column
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
abacus::Column::uBound_
double uBound_
The upper bound of the column.
Definition: column.h:149
abacus::AbacusGlobal
Global data and functions.
Definition: global.h:58
abacus::Column::uBound
void uBound(double u)
Sets the upper bound of the column to u.
Definition: column.h:133