Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

srowcon.h
Go to the documentation of this file.
1 
30 #pragma once
31 
32 #include <ogdf/lib/abacus/rowcon.h>
33 
34 #pragma GCC visibility push(default)
35 namespace abacus {
36 
38 
44 class SRowCon : public RowCon {
45 public:
46 
48 
67  SRowCon(Master *master,
68  const Sub *sub,
70  int nnz,
71  const Array<int> &support,
72  const Array<double> &coeff,
73  double rhs,
74  bool dynamic,
75  bool local,
76  bool liftable)
77  : RowCon(master, sub, sense, nnz, support, coeff, rhs, dynamic, local, liftable)
78  { }
79 
81 
100  SRowCon(Master *master,
101  const Sub *sub,
103  int nnz,
104  int *support,
105  double *coeff,
106  double rhs,
107  bool dynamic,
108  bool local,
109  bool liftable)
110  : RowCon(master, sub, sense, nnz, support, coeff, rhs, dynamic, local, liftable)
111  { }
112 
114  virtual ~SRowCon() { }
115 
117 
127  virtual int genRow(Active<Variable, Constraint> *var, Row &row) const override {
128  row.copy(row_);
129  return row_.nnz();
130  }
131 
133 
143  virtual double slack(Active<Variable, Constraint> *variables,
144  double *x) const override;
145 };
146 
147 }
148 #pragma GCC visibility pop
abacus::Active
Implements the sets of active constraints and variables which are associated with each subproblem.
Definition: active.h:44
abacus::ConVar::local
bool local() const
Returns true if the constraint/variable is only locally valid, false otherwise.
Definition: convar.h:114
abacus::RowCon::row_
Row row_
The representation of the constraint.
Definition: rowcon.h:160
abacus::SRowCon::slack
virtual double slack(Active< Variable, Constraint > *variables, double *x) const override
Computes the slack of a vector associated with the variable set variables.
abacus::ConVar::sub
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
Definition: convar.h:200
rowcon.h
constraint using row.
abacus::Constraint::rhs
virtual double rhs() const
Returns the right hand side of the constraint.
Definition: constraint.h:131
abacus
Definition: ILPClusterPlanarity.h:50
abacus::SparVec::nnz
int nnz() const
Returns the number of nonzero elements.
Definition: sparvec.h:233
abacus::Row::copy
void copy(const Row &row)
Copies row.
abacus::Constraint::liftable
bool liftable() const
Checks if the constraint is liftable.
Definition: constraint.h:141
abacus::SRowCon::genRow
virtual int genRow(Active< Variable, Constraint > *var, Row &row) const override
Generates the row format of the constraint associated with the variable set var.
Definition: srowcon.h:127
abacus::RowCon::coeff
virtual double coeff(const Variable *v) const override
Computes the coefficient of a variable which must be of type NumVar.
Definition: rowcon.h:137
abacus::ConVar::dynamic
virtual bool dynamic() const
Return true if the constraint/variable is dynamic.
Definition: convar.h:125
abacus::RowCon
Implements constraints stored in the class Row.
Definition: rowcon.h:50
abacus::RowCon::row
Row * row()
Returns a pointer to the object of the class Row representing the constraint.
Definition: rowcon.h:153
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:219
abacus::Row
Representation of constraints in the row format.
Definition: row.h:52
abacus::Constraint::sense
CSense * sense()
Returns a pointer to the sense of the constraint.
Definition: constraint.h:116
abacus::SRowCon::SRowCon
SRowCon(Master *master, const Sub *sub, CSense::SENSE sense, int nnz, int *support, double *coeff, double rhs, bool dynamic, bool local, bool liftable)
Creates a row constraint.
Definition: srowcon.h:100
abacus::SRowCon
Constraints using row with static variable set.
Definition: srowcon.h:44
abacus::Sub
The subproblem.
Definition: sub.h:69
Minisat::Internal::var
int var(Lit p)
Definition: SolverTypes.h:62
abacus::CSense::SENSE
SENSE
Definition: csense.h:52
abacus::Master
The master of the optimization.
Definition: master.h:70
abacus::SRowCon::SRowCon
SRowCon(Master *master, const Sub *sub, CSense::SENSE sense, int nnz, const Array< int > &support, const Array< double > &coeff, double rhs, bool dynamic, bool local, bool liftable)
Creates a row constraint.
Definition: srowcon.h:67
abacus::SRowCon::~SRowCon
virtual ~SRowCon()
The destructor.
Definition: srowcon.h:114