Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint Class Reference

Class for directed cuts (i.e., separated Steiner cuts) More...

#include <ogdf/graphalg/MinSteinerTreeDirectedCut.h>

+ Inheritance diagram for ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint:

Public Member Functions

 DirectedCutConstraint (abacus::Master *master, const Graph &g, const MinSTCutMaxFlow< double > *minSTCut, MinSTCutMaxFlow< double >::cutType _cutType)
 
bool active (node n) const
 returns true iff the node n is separated by this cut More...
 
double coeff (const abacus::Variable *v) const override
 Returns the coefficient of the variable v in the constraint. More...
 
bool cutedge (edge e) const
 returns true iff the edge is contained in the cut More...
 
bool equal (const ConVar *cv) const override
 tests if cuts are equal; required method for nonduplpool More...
 
unsigned hashKey () const override
 retuns an hashkey for the cut; required method for nonduplpool More...
 
bool marked (node n) const
 returns status of node n More...
 
const char * name () const override
 return the name of the cut; required method for nonduplpool More...
 
int nMarkedNodes () const
 the number of marked nodes More...
 
- Public Member Functions inherited from abacus::Constraint
 Constraint (const Constraint &rhs)
 Copy constructor. More...
 
 Constraint (Master *master)
 Initializes an empty constraint. More...
 
 Constraint (Master *master, const Sub *sub, CSense::SENSE sense, double rhs, bool dynamic, bool local, bool liftable)
 Initializes a constraint. More...
 
virtual ~Constraint ()
 
ConClassclassification (Active< Variable, Constraint > *var=nullptr) const
 Returns a pointer to the classification of the constraint. More...
 
virtual double distance (double *x, Active< Variable, Constraint > *actVar) const
 Returns the Euclidean distance of x associated with variable set actVar to the hyperplane induced by the constraint. More...
 
virtual int genRow (Active< Variable, Constraint > *var, Row &row) const
 Generates the row format of the constraint associated with the variable set var. More...
 
bool liftable () const
 Checks if the constraint is liftable. More...
 
void printRow (std::ostream &out, Active< Variable, Constraint > *var) const
 Writes the row format of the constraint associated with the variable set var to output stream out. More...
 
virtual double rhs () const
 Returns the right hand side of the constraint. More...
 
CSensesense ()
 Returns a pointer to the sense of the constraint. More...
 
const CSensesense () const
 Returns a const pointer to the sense of the constraint. More...
 
virtual double slack (Active< Variable, Constraint > *variables, double *x) const
 Computes the slack of the vector x associated with the variable set variables. More...
 
virtual bool valid (Sub *sub) const
 Checks if the constraint is valid for the subproblem sub. More...
 
virtual bool violated (Active< Variable, Constraint > *variables, double *x, double *sl=nullptr) const
 Checks if a constraint is violated by a vector x associated with a variable set. More...
 
virtual bool violated (double slack) const
 Checks if a constraint is violated given the slack of a vector. More...
 
- Public Member Functions inherited from abacus::ConVar
 ConVar (Master *master, const Sub *sub, bool dynamic, bool local)
 Creates an instance of type ConVar. More...
 
virtual ~ConVar ()
 
bool active () const
 Checks if the constraint/variable is active in at least one active subproblem. More...
 
virtual bool dynamic () const
 Return true if the constraint/variable is dynamic. More...
 
bool global () const
 Returns true if the constraint/variable is globally valid, false otherwise. More...
 
bool local () const
 Returns true if the constraint/variable is only locally valid, false otherwise. More...
 
bool expanded () const
 Returns true if the expanded format of a constraint/variable is available, false otherwise. More...
 
virtual void expand () const
 Expands a constraint/variable. More...
 
virtual void compress () const
 Compresses a constraint/variable. More...
 
virtual bool deletable () const
 Returns true if the constraint/variable can be destructed. More...
 
virtual void print (std::ostream &out) const
 Writes the constraint/variable to the output stream out. More...
 
const Subsub () const
 Returns a const pointer to the subproblem associated with the constraint/variable. More...
 
void sub (Sub *sub)
 Associates a new subproblem with the constraint/variable. More...
 
virtual bool equal (const ConVar *cv) const
 Should compare if the constraint/variable is identical (in a mathematical sense) with the constraint/variable cv. More...
 
virtual double rank () const
 The function should return a rank associated with the constraint/variable. More...
 
- Public Member Functions inherited from abacus::AbacusRoot
virtual ~AbacusRoot ()
 The destructor. More...
 

Private Attributes

unsigned int m_hashKey
 hashkey of the cut; required method for nonduplpool More...
 
NodeArray< bool > m_marked
 defines if a vertex is on the left side of the cut (false) or not More...
 
const char * m_name
 name of the cut; required method for nonduplpool More...
 
int m_nMarkedNodes
 number of marked nodes More...
 
const Graphm_pGraph
 the graph More...
 

Additional Inherited Members

- Static Public Member Functions inherited from abacus::AbacusRoot
static bool ascii2bool (const string &str)
 Converts the string str to a boolean value. More...
 
static bool endsWith (const string &str, const string &end)
 Returns true if str ends with end, false otherwise. More...
 
static double fracPart (double x)
 Returns the absolute value of the fractional part of x. More...
 
static const char * onOff (bool value)
 Converts a boolean variable to the strings "on" and "off". More...
 
- Protected Member Functions inherited from abacus::Constraint
virtual ConClassclassify (Active< Variable, Constraint > *var) const
 The default implementation returns a 0 pointer. More...
 
virtual InfeasCon::INFEAS voidLhsViolated (double newRhs) const
 Can be called if after variable elimination the left hand side of the constraint has become void and the right hand side has been adapted to newRhs. More...
 
- Protected Attributes inherited from abacus::Constraint
ConClassconClass_
 
bool liftable_
 This member is true if also coefficients of variables which have been inactive at generation time can be computed, false otherwise. More...
 
double rhs_
 The right hand side of the constraint. More...
 
CSense sense_
 The sense of the constraint. More...
 
- Protected Attributes inherited from abacus::ConVar
Mastermaster_
 A pointer to the corresponding master of the optimization. More...
 
const Subsub_
 A pointer to the subproblem associated with the constraint/variable. More...
 
bool expanded_
 true, if expanded version of constraint/variables available. More...
 
int nReferences_
 The number of references to the pool slot the constraint is stored in. More...
 
bool dynamic_
 If this member is true then the constraint/variable can be also removed from the active formulation after it is added the first time. More...
 
int nActive_
 The number of active subproblems of which the constraint/variable belongs to the set of active constraints/variables. More...
 
int nLocks_
 The number of locks which have been set on the constraint/variable. More...
 
bool local_
 true if the constraint/variable is only locally valid More...
 

Detailed Description

template<typename T>
class ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint

Class for directed cuts (i.e., separated Steiner cuts)

Definition at line 947 of file MinSteinerTreeDirectedCut.h.

Constructor & Destructor Documentation

◆ DirectedCutConstraint()

template<typename T >
ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::DirectedCutConstraint ( abacus::Master master,
const Graph g,
const MinSTCutMaxFlow< double > *  minSTCut,
MinSTCutMaxFlow< double >::cutType  _cutType 
)
inline

Definition at line 950 of file MinSteinerTreeDirectedCut.h.

Member Function Documentation

◆ active()

template<typename T >
bool ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::active ( node  n) const
inline

returns true iff the node n is separated by this cut

Definition at line 998 of file MinSteinerTreeDirectedCut.h.

◆ coeff()

template<typename T >
double ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::coeff ( const abacus::Variable v) const
overridevirtual

Returns the coefficient of the variable v in the constraint.

Parameters
vA pointer to a variable.
Returns
The coefficient of the variable v in the constraint.

Implements abacus::Constraint.

Definition at line 2172 of file MinSteinerTreeDirectedCut.h.

◆ cutedge()

template<typename T >
bool ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::cutedge ( edge  e) const
inline

returns true iff the edge is contained in the cut

Definition at line 1002 of file MinSteinerTreeDirectedCut.h.

◆ equal()

template<typename T >
bool ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::equal ( const ConVar cv) const
override

tests if cuts are equal; required method for nonduplpool

Definition at line 2153 of file MinSteinerTreeDirectedCut.h.

◆ hashKey()

template<typename T >
unsigned ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::hashKey ( ) const
inlineoverridevirtual

retuns an hashkey for the cut; required method for nonduplpool

Reimplemented from abacus::ConVar.

Definition at line 1010 of file MinSteinerTreeDirectedCut.h.

◆ marked()

template<typename T >
bool ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::marked ( node  n) const
inline

returns status of node n

Definition at line 1008 of file MinSteinerTreeDirectedCut.h.

◆ name()

template<typename T >
const char* ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::name ( ) const
inlineoverridevirtual

return the name of the cut; required method for nonduplpool

Reimplemented from abacus::ConVar.

Definition at line 1014 of file MinSteinerTreeDirectedCut.h.

◆ nMarkedNodes()

template<typename T >
int ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::nMarkedNodes ( ) const
inline

the number of marked nodes

Definition at line 1006 of file MinSteinerTreeDirectedCut.h.

Member Data Documentation

◆ m_hashKey

template<typename T >
unsigned int ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::m_hashKey
private

hashkey of the cut; required method for nonduplpool

Definition at line 1031 of file MinSteinerTreeDirectedCut.h.

◆ m_marked

template<typename T >
NodeArray<bool> ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::m_marked
private

defines if a vertex is on the left side of the cut (false) or not

Definition at line 1025 of file MinSteinerTreeDirectedCut.h.

◆ m_name

template<typename T >
const char* ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::m_name
private

name of the cut; required method for nonduplpool

Definition at line 1033 of file MinSteinerTreeDirectedCut.h.

◆ m_nMarkedNodes

template<typename T >
int ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::m_nMarkedNodes
private

number of marked nodes

Definition at line 1028 of file MinSteinerTreeDirectedCut.h.

◆ m_pGraph

template<typename T >
const Graph* ogdf::MinSteinerTreeDirectedCut< T >::DirectedCutConstraint::m_pGraph
private

the graph

Definition at line 1018 of file MinSteinerTreeDirectedCut.h.


The documentation for this class was generated from the following file: