Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
srowcon.h
Go to the documentation of this file.
1
30#pragma once
31
33
34namespace abacus {
35
37
43class SRowCon : public RowCon {
44public:
45
47
66 SRowCon(Master *master,
67 const Sub *sub,
69 int nnz,
70 const Array<int> &support,
71 const Array<double> &coeff,
72 double rhs,
73 bool dynamic,
74 bool local,
75 bool liftable)
76 : RowCon(master, sub, sense, nnz, support, coeff, rhs, dynamic, local, liftable)
77 { }
78
80
99 SRowCon(Master *master,
100 const Sub *sub,
102 int nnz,
103 int *support,
104 double *coeff,
105 double rhs,
106 bool dynamic,
107 bool local,
108 bool liftable)
109 : RowCon(master, sub, sense, nnz, support, coeff, rhs, dynamic, local, liftable)
110 { }
111
113 virtual ~SRowCon() { }
114
116
126 virtual int genRow(Active<Variable, Constraint> *var, Row &row) const override {
127 row.copy(row_);
128 return row_.nnz();
129 }
130
132
143 double *x) const override;
144};
145
146}
Implements the sets of active constraints and variables which are associated with each subproblem.
Definition active.h:62
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
Definition convar.h:199
bool local() const
Returns true if the constraint/variable is only locally valid, false otherwise.
Definition convar.h:113
virtual bool dynamic() const
Return true if the constraint/variable is dynamic.
Definition convar.h:124
bool liftable() const
Checks if the constraint is liftable.
Definition constraint.h:140
CSense * sense()
Returns a pointer to the sense of the constraint.
Definition constraint.h:115
virtual double rhs() const
Returns the right hand side of the constraint.
Definition constraint.h:130
The master of the optimization.
Definition master.h:69
Implements constraints stored in the class Row.
Definition rowcon.h:49
Row * row()
Returns a pointer to the object of the class Row representing the constraint.
Definition rowcon.h:152
Row row_
The representation of the constraint.
Definition rowcon.h:159
virtual double coeff(const Variable *v) const override
Computes the coefficient of a variable which must be of type NumVar.
Definition rowcon.h:136
Representation of constraints in the row format.
Definition row.h:51
void copy(const Row &row)
Copies row.
Constraints using row with static variable set.
Definition srowcon.h:43
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:126
virtual double slack(Active< Variable, Constraint > *variables, double *x) const override
Computes the slack of a vector associated with the variable set variables.
virtual ~SRowCon()
The destructor.
Definition srowcon.h:113
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:66
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:99
int nnz() const
Returns the number of nonzero elements.
Definition sparvec.h:232
The subproblem.
Definition sub.h:68
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:214
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
constraint using row.