Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::ClusterGraphAttributes Class Reference

Stores additional attributes of a clustered graph (like layout information). More...

#include <ogdf/cluster/ClusterGraphAttributes.h>

+ Inheritance diagram for ogdf::ClusterGraphAttributes:

Public Member Functions

ColorfillBgColor (node v)
 Returns the background color of fill patterns for node v.
 
const ColorfillBgColor (node v) const
 Returns the background color of fill patterns for node v.
 
ColorfillColor (node v)
 Returns the fill color of node v.
 
const ColorfillColor (node v) const
 Returns the fill color of node v.
 
FillPatternfillPattern (node v)
 Returns the fill pattern of node v.
 
FillPattern fillPattern (node v) const
 Returns the fill pattern of node v.
 
NodeArray< double > & height ()
 Returns a reference to the node array m_height.
 
const NodeArray< double > & height () const
 Returns a reference to the node array m_height.
 
doubleheight (node v)
 Returns the height of the bounding box of node v.
 
double height (node v) const
 Returns the height of the bounding box of node v.
 
string & label (edge e)
 Returns the label of edge e.
 
const string & label (edge e) const
 Returns the label of edge e.
 
string & label (node v)
 Returns the label of node v.
 
const string & label (node v) const
 Returns the label of node v.
 
ColorstrokeColor (edge e)
 Returns the stroke color of edge e.
 
const ColorstrokeColor (edge e) const
 Returns the stroke color of edge e.
 
ColorstrokeColor (node v)
 Returns the stroke color of node v.
 
const ColorstrokeColor (node v) const
 Returns the stroke color of node v.
 
StrokeTypestrokeType (edge e)
 Returns the stroke type of edge e.
 
StrokeType strokeType (edge e) const
 Returns the stroke type of edge e.
 
StrokeTypestrokeType (node v)
 Returns the stroke type of node v.
 
StrokeType strokeType (node v) const
 Returns the stroke type of node v.
 
floatstrokeWidth (edge e)
 Returns the stroke width of edge e.
 
float strokeWidth (edge e) const
 Returns the stroke width of edge e.
 
floatstrokeWidth (node v)
 Returns the stroke width of node v.
 
float strokeWidth (node v) const
 Returns the stroke width of node v.
 
NodeArray< double > & width ()
 Returns a reference to the node array #m_width.
 
const NodeArray< double > & width () const
 Returns a reference to the node array m_width.
 
doublewidth (node v)
 Returns the width of the bounding box of node v.
 
double width (node v) const
 Returns the width of the bounding box of node v.
 
doublex (node v)
 Returns the x-coordinate of node v.
 
double x (node v) const
 Returns the x-coordinate of node v.
 
doubley (node v)
 Returns the y-coordinate of node v.
 
double y (node v) const
 Returns the y-coordinate of node v.
 
Cluster attributes
double x (cluster c) const
 Returns the x-position of cluster c's cage (lower left corner).
 
doublex (cluster c)
 Returns the x-position of cluster c's cage (lower left corner).
 
double y (cluster c) const
 Returns the y-position of cluster c's cage (lower left corner).
 
doubley (cluster c)
 Returns the y-position of cluster c's cage (lower left corner).
 
double width (cluster c) const
 Returns the width of cluster c.
 
doublewidth (cluster c)
 Returns the width of cluster c.
 
double height (cluster c) const
 Returns the height of cluster c.
 
doubleheight (cluster c)
 Returns the height of cluster c.
 
const StrokeTypestrokeType (cluster c) const
 Returns the stroke type of cluster c.
 
StrokeTypestrokeType (cluster c)
 Returns the stroke type of cluster c.
 
const ColorstrokeColor (cluster c) const
 Returns the stroke color of cluster c.
 
ColorstrokeColor (cluster c)
 Returns the stroke color of cluster c.
 
const floatstrokeWidth (cluster c) const
 Returns the stroke width of cluster c.
 
floatstrokeWidth (cluster c)
 Returns the stroke width of cluster c.
 
const FillPatternfillPattern (cluster c) const
 Returns the fill pattern of cluster c.
 
FillPatternfillPattern (cluster c)
 Returns the fill pattern of cluster c.
 
const ColorfillColor (cluster c) const
 Returns the fill color of cluster c.
 
ColorfillColor (cluster c)
 Returns the fill color of cluster c.
 
const ColorfillBgColor (cluster c) const
 Returns the background color of fill patterns for cluster c.
 
ColorfillBgColor (cluster c)
 Returns the background color of fill patterns for cluster c.
 
const string & label (cluster c) const
 Returns the label of cluster c.
 
string & label (cluster c)
 Returns the label of cluster c.
 
const string & templateCluster (cluster c) const
 Returns the template of cluster c.
 
string & templateCluster (cluster c)
 Returns the template of cluster c.
 
Layout transformations
virtual void scale (double sx, double sy, bool scaleNodes=true) override
 Scales the layout by (sx,sy).
 
virtual void translate (double dx, double dy) override
 Translates the layout by (dx,dy).
 
virtual void flipVertical (const DRect &box) override
 Flips the (whole) layout vertically such that the part in box remains in this area.
 
virtual void flipHorizontal (const DRect &box) override
 Flips the (whole) layout horizontally such that the part in box remains in this area.
 
virtual void flipHorizontal ()
 Flips the layout horizontally within its bounding box.
 
virtual void flipHorizontal (const DRect &box)
 Flips the (whole) layout horizontally such that the part in box remains in this area.
 
virtual void flipVertical ()
 Flips the layout vertically within its bounding box.
 
virtual void flipVertical (const DRect &box)
 Flips the (whole) layout vertically such that the part in box remains in this area.
 
virtual void scale (double sx, double sy, bool scaleNodes=true)
 Scales the layout by (sx,sy).
 
virtual void scale (double s, bool scaleNodes=true)
 Scales the layout by s.
 
Utility functions
virtual DRect boundingBox () const override
 Returns the bounding box of the layout.
 
void updateClusterPositions (double boundaryDist=1.0)
 Updates positions of cluster boundaries wrt to children and child clusters.
 
cluster clusterOf (node v)
 Returns the parent cluster of node v.
 
- Public Member Functions inherited from ogdf::GraphAttributes
 GraphAttributes ()
 Constructs graph attributes for no associated graph (default constructor).
 
 GraphAttributes (const Graph &G, long attr=nodeGraphics|edgeGraphics)
 Constructs graph attributes associated with the graph G.
 
 GraphAttributes (const GraphAttributes &)=default
 Copy constructor.
 
GraphAttributesoperator= (const GraphAttributes &)=default
 Copy assignment operator.
 
virtual ~GraphAttributes ()
 
long attributes () const
 Returns currently accessible attributes.
 
bool has (long attr) const
 Returns true iff all attributes in attr are available.
 
void init (long attr)
 Re-initializes the graph attributes while maintaining the associated graph.
 
void addAttributes (long attr)
 Enables attributes specified by attr and allocates required memory.
 
void destroyAttributes (long attr)
 Disables attributes specified by attr and releases available memory.
 
const GraphconstGraph () const
 Returns a reference to the associated graph.
 
bool directed () const
 Returns if the graph is directed.
 
booldirected ()
 Returns if the graph is directed.
 
double x (node v) const
 Returns the x-coordinate of node v.
 
doublex (node v)
 Returns the x-coordinate of node v.
 
double y (node v) const
 Returns the y-coordinate of node v.
 
doubley (node v)
 Returns the y-coordinate of node v.
 
double z (node v) const
 Returns the z-coordinate of node v.
 
doublez (node v)
 Returns the z-coordinate of node v.
 
double xLabel (node v) const
 Returns the label x-coordinate of node v.
 
doublexLabel (node v)
 Returns the label x-coordinate of node v.
 
double yLabel (node v) const
 Returns the label y-coordinate of node v.
 
doubleyLabel (node v)
 Returns the label y-coordinate of node v.
 
double zLabel (node v) const
 Returns the label z-coordinate of node v.
 
doublezLabel (node v)
 Returns the label z-coordinate of node v.
 
double width (node v) const
 Returns the width of the bounding box of node v.
 
doublewidth (node v)
 Returns the width of the bounding box of node v.
 
const NodeArray< double > & width () const
 Returns a reference to the node array m_width.
 
NodeArray< double > & width ()
 Returns a reference to the node array #m_width.
 
double height (node v) const
 Returns the height of the bounding box of node v.
 
doubleheight (node v)
 Returns the height of the bounding box of node v.
 
const NodeArray< double > & height () const
 Returns a reference to the node array m_height.
 
NodeArray< double > & height ()
 Returns a reference to the node array m_height.
 
Shape shape (node v) const
 Returns the shape type of node v.
 
Shapeshape (node v)
 Returns the shape type of node v.
 
StrokeType strokeType (node v) const
 Returns the stroke type of node v.
 
StrokeTypestrokeType (node v)
 Returns the stroke type of node v.
 
const ColorstrokeColor (node v) const
 Returns the stroke color of node v.
 
ColorstrokeColor (node v)
 Returns the stroke color of node v.
 
float strokeWidth (node v) const
 Returns the stroke width of node v.
 
floatstrokeWidth (node v)
 Returns the stroke width of node v.
 
FillPattern fillPattern (node v) const
 Returns the fill pattern of node v.
 
FillPatternfillPattern (node v)
 Returns the fill pattern of node v.
 
const ColorfillColor (node v) const
 Returns the fill color of node v.
 
ColorfillColor (node v)
 Returns the fill color of node v.
 
const ColorfillBgColor (node v) const
 Returns the background color of fill patterns for node v.
 
ColorfillBgColor (node v)
 Returns the background color of fill patterns for node v.
 
const string & label (node v) const
 Returns the label of node v.
 
string & label (node v)
 Returns the label of node v.
 
const string & templateNode (node v) const
 Returns the template name of node v.
 
string & templateNode (node v)
 Returns the template name of node v.
 
int weight (node v) const
 Returns the weight of node v.
 
intweight (node v)
 Returns the weight of node v.
 
Graph::NodeType type (node v) const
 Returns the type of node v.
 
Graph::NodeTypetype (node v)
 Returns the type of node v.
 
int idNode (node v) const
 Returns the user ID of node v.
 
intidNode (node v)
 Returns the user ID of node v.
 
const DPolylinebends (edge e) const
 Returns the list of bend points of edge e.
 
DPolylinebends (edge e)
 Returns the list of bend points of edge e.
 
EdgeArrow arrowType (edge e) const
 Returns the arrow type of edge e.
 
EdgeArrowarrowType (edge e)
 Returns the arrow type of edge e.
 
StrokeType strokeType (edge e) const
 Returns the stroke type of edge e.
 
StrokeTypestrokeType (edge e)
 Returns the stroke type of edge e.
 
const ColorstrokeColor (edge e) const
 Returns the stroke color of edge e.
 
ColorstrokeColor (edge e)
 Returns the stroke color of edge e.
 
float strokeWidth (edge e) const
 Returns the stroke width of edge e.
 
floatstrokeWidth (edge e)
 Returns the stroke width of edge e.
 
const string & label (edge e) const
 Returns the label of edge e.
 
string & label (edge e)
 Returns the label of edge e.
 
int intWeight (edge e) const
 Returns the (integer) weight of edge e.
 
intintWeight (edge e)
 Returns the (integer) weight of edge e.
 
double doubleWeight (edge e) const
 Returns the (real number) weight of edge e.
 
doubledoubleWeight (edge e)
 Returns the (real number) weight of edge e.
 
Graph::EdgeType type (edge e) const
 Returns the type of edge e.
 
Graph::EdgeTypetype (edge e)
 Returns the type of edge e.
 
uint32_t subGraphBits (edge e) const
 Returns the edgesubgraph value of an edge e.
 
uint32_tsubGraphBits (edge e)
 Returns the edgesubgraph value of an edge e.
 
bool inSubGraph (edge e, int n) const
 Checks whether edge e belongs to basic graph n.
 
void addSubGraph (edge e, int n)
 Adds edge e to basic graph n.
 
void removeSubGraph (edge e, int n)
 Removes edge e from basic graph n.
 
virtual void translateToNonNeg ()
 Translates the layout such that the lower left corner is at (0,0).
 
virtual void scaleAndTranslate (double sx, double sy, double dx, double dy, bool scaleNodes=true)
 Scales the layout by (sx,sy) and then translates it by (dx,dy).
 
virtual void scaleAndTranslate (double s, double dx, double dy, bool scaleNodes=true)
 Scales the layout by s and then translates it by (dx,dy).
 
virtual void rotateRight90 ()
 Rotates the layout by 90 degree (in clockwise direction) around the origin.
 
virtual void rotateLeft90 ()
 Rotates the layout by 90 degree (in counter-clockwise direction) around the origin.
 
template<typename T >
bool isUniformForNodes (NodeAttributeGetter< T > attribute) const
 Checks whether a certain attribute has the same value for all nodes.
 
template<typename T >
bool isUniformForEdges (EdgeAttributeGetter< T > attribute) const
 Checks whether a certain attribute has the same value for all edges.
 
bool isUniform (long attributes) const
 Check whether all of the attributes associated with the bitflags in attributes (that are also enabled for this ogdf::GraphAttributes instance) are uniform, i.e.
 
DPoint point (node v) const
 Returns a DPoint corresponding to the x- and y-coordinates of v.
 
void transferToOriginal (GraphAttributes &origAttr) const
 Copies attributes of this to origAttr.
 
void transferToCopy (GraphAttributes &copyAttr) const
 Copies attributes of this to copyAttr.
 
template<class Rectangle = DRect>
void nodeBoundingBoxes (NodeArray< Rectangle > &boundingBoxes) const
 Computes the bounding rectangle for each node.
 
void setAllWidth (double w)
 Sets the width of all nodes to w.
 
void setAllHeight (double h)
 Sets the height of all nodes to h.
 
void clearAllBends ()
 Removes all edge bends.
 
void removeUnnecessaryBendsHV ()
 Removes unnecessary bend points in orthogonal segements.
 
void addNodeCenter2Bends (int mode=1)
 Adds additional bend points to all edges for connecting their endpoints.
 
bool isAssociationClass (node v) const
 Returns true iff v represents an association class.
 
int hierarchyList (List< List< node > * > &list) const
 Returns a list of all inheritance hierarchies in the graph.
 
int hierarchyList (List< List< edge > * > &list) const
 Returns a list of all inheritance hierarchies in the graph.
 

Static Public Attributes

Flags for enabling attributes
static const long clusterGraphics
 Corresponds to cluster attributes x(cluster), y(cluster), width(cluster), height(cluster).
 
static const long clusterStyle
 Corresponds to cluster attributes strokeColor(cluster), strokeType(cluster), strokeWidth(cluster), fillPattern(cluster), fillColor(cluster), and fillBgColor(cluster).
 
static const long clusterLabel
 Corresponds to cluster attribute label(cluster).
 
static const long clusterTemplate
 Corresponds to cluster attribute templateCluster(cluster).
 
static const long all
 Enables all available flags.
 
- Static Public Attributes inherited from ogdf::GraphAttributes
static const long nodeGraphics
 Corresponds to node attributes x(node), y(node), width(node), height(node), and shape(node).
 
static const long edgeGraphics
 Corresponds to edge attribute bends(edge).
 
static const long edgeIntWeight
 Corresponds to edge attribute intWeight(edge).
 
static const long edgeDoubleWeight
 Corresponds to edge attribute doubleWeight(edge).
 
static const long edgeLabel
 Corresponds to edge attribute label(edge).
 
static const long nodeLabel
 Corresponds to node attribute label(node).
 
static const long edgeType
 Corresponds to edge attribute type(edge).
 
static const long nodeType
 Corresponds to node attribute type(node).
 
static const long nodeId
 Corresponds to node attribute idNode(node).
 
static const long edgeArrow
 Corresponds to edge attribute arrowType(edge).
 
static const long edgeStyle
 Corresponds to edge attributes strokeColor(edge), strokeType(edge), and strokeWidth(edge).
 
static const long nodeStyle
 Corresponds to node attributes strokeColor(node), strokeType(node), strokeWidth(node), fillPattern(node), fillColor(node), and fillBgColor(node).
 
static const long nodeTemplate
 Corresponds to node attribute templateNode(node).
 
static const long edgeSubGraphs
 Corresponds to edge attributes modified by addSubGraph(edge, int), inSubGraph(edge, int) const, and removeSubGraph(edge, int).
 
static const long nodeWeight
 Corresponds to node attribute weight(node).
 
static const long threeD
 Corresponds to node attribute z(node). Note that all methods work on 2D coordinates only.
 
static const long nodeLabelPosition
 Corresponds to node attributes xLabel(node), yLabel(node), and zLabel(node).
 
static const long all
 Enables all available flags.
 

Protected Attributes

ClusterArray< string > m_clusterTemplate
 Name of cluster template.
 
ClusterArray< Fillm_fill
 Fill (style of interior)
 
ClusterArray< doublem_height
 Cluster height.
 
ClusterArray< string > m_label
 Cluster label.
 
const ClusterGraphm_pClusterGraph
 Only points to existing graphs.
 
ClusterArray< Strokem_stroke
 Stroke (style of boundary)
 
ClusterArray< doublem_width
 Cluster width.
 
ClusterArray< doublem_x
 X-position of lower left corner.
 
ClusterArray< doublem_y
 Y-position of lower left corner.
 
- Protected Attributes inherited from ogdf::GraphAttributes
long m_attributes
 bit vector of currently used attributes
 
EdgeArray< DPolylinem_bends
 list of bend points of an edge
 
bool m_directed
 whether or not the graph is directed
 
EdgeArray< doublem_doubleWeight
 (real number) weight of an edge
 
EdgeArray< EdgeArrowm_edgeArrow
 arrow type of an edge
 
EdgeArray< string > m_edgeLabel
 label of an edge
 
EdgeArray< Strokem_edgeStroke
 stroke of an edge
 
EdgeArray< Graph::EdgeTypem_eType
 type of an edge (association or generalization)
 
NodeArray< doublem_height
 height of a nodes's bounding box
 
EdgeArray< intm_intWeight
 (integer) weight of an edge
 
NodeArray< Fillm_nodeFill
 fill of a node
 
NodeArray< intm_nodeId
 user ID of a node
 
NodeArray< intm_nodeIntWeight
 (integer) weight of a node
 
NodeArray< string > m_nodeLabel
 label of a node
 
NodeArray< doublem_nodeLabelPosX
 x-coordinate of a node label
 
NodeArray< doublem_nodeLabelPosY
 y-coordinate of a node label
 
NodeArray< doublem_nodeLabelPosZ
 z-coordinate of a node label
 
NodeArray< Shapem_nodeShape
 shape of a node
 
NodeArray< Strokem_nodeStroke
 stroke of a node
 
NodeArray< string > m_nodeTemplate
 name of template of a node
 
const Graphm_pGraph
 associated graph
 
EdgeArray< uint32_tm_subGraph
 is element of subgraphs given by bitvector
 
NodeArray< Graph::NodeTypem_vType
 type (vertex, dummy, generalizationMerger)
 
NodeArray< doublem_width
 width of a node's bounding box
 
NodeArray< doublem_x
 x-coordinate of a node
 
NodeArray< doublem_y
 y-coordinate of a node
 
NodeArray< doublem_z
 z-coordinate of a node
 

Construction and management of attributes

 ClusterGraphAttributes ()
 Constructs cluster graph attributes for no associated graph.
 
 ClusterGraphAttributes (const ClusterGraph &cg, long initAttributes=nodeGraphics|edgeGraphics|clusterGraphics)
 Constructs cluster graph attributes for cluster graph cg with attributes initAttributes.
 
virtual ~ClusterGraphAttributes ()
 
void init (ClusterGraph &cg, long attr=0)
 Initializes the ClusterGraphAttributes for ClusterGraph cg.
 
void init (long attr=0)
 Re-initializes the ClusterGraphAttributes while maintaining the associated CluterGraph.
 
void addAttributes (long attr)
 Enables attributes specified by attr and allocates required memory.
 
void destroyAttributes (long attr)
 Disables attributes specified by attr and releases available memory.
 
const ClusterGraphconstClusterGraph () const
 Returns the associated cluster graph.
 
void addClusterAttributes (long attr)
 Add all cluster-related attributes in attr.
 
void destroyClusterAttributes (long attr)
 Destroy all cluster-related attributes in attr.
 
virtual void init (const Graph &G, long attr)
 Forbidden initialization, use init(ClusterGraph &cg, long initAttributes) instead!
 
void init (long attr)
 Forbidden initialization, use init(ClusterGraph &cg, long initAttributes) instead!
 

Additional Inherited Members

- Public Types inherited from ogdf::GraphAttributes
template<typename T >
using NodeAttributeGetter = T(GraphAttributes::*)(node) const
 type of node attribute getter functions
 
template<typename T >
using EdgeAttributeGetter = T(GraphAttributes::*)(edge) const
 type of edge attribute getter functions
 

Detailed Description

Stores additional attributes of a clustered graph (like layout information).

Definition at line 46 of file ClusterGraphAttributes.h.

Constructor & Destructor Documentation

◆ ClusterGraphAttributes() [1/2]

ogdf::ClusterGraphAttributes::ClusterGraphAttributes ( )
inline

Constructs cluster graph attributes for no associated graph.

Definition at line 107 of file ClusterGraphAttributes.h.

◆ ClusterGraphAttributes() [2/2]

ogdf::ClusterGraphAttributes::ClusterGraphAttributes ( const ClusterGraph cg,
long  initAttributes = nodeGraphics|edgeGraphics|clusterGraphics 
)
explicit

Constructs cluster graph attributes for cluster graph cg with attributes initAttributes.

◆ ~ClusterGraphAttributes()

virtual ogdf::ClusterGraphAttributes::~ClusterGraphAttributes ( )
inlinevirtual

Definition at line 113 of file ClusterGraphAttributes.h.

Member Function Documentation

◆ addAttributes()

void ogdf::ClusterGraphAttributes::addAttributes ( long  attr)

Enables attributes specified by attr and allocates required memory.

◆ addClusterAttributes()

void ogdf::ClusterGraphAttributes::addClusterAttributes ( long  attr)
private

Add all cluster-related attributes in attr.

Precondition
m_attributes already contains attr.

◆ boundingBox()

virtual DRect ogdf::ClusterGraphAttributes::boundingBox ( ) const
overridevirtual

Returns the bounding box of the layout.

Reimplemented from ogdf::GraphAttributes.

◆ clusterOf()

cluster ogdf::ClusterGraphAttributes::clusterOf ( node  v)
inline

Returns the parent cluster of node v.

Definition at line 431 of file ClusterGraphAttributes.h.

◆ constClusterGraph()

const ClusterGraph & ogdf::ClusterGraphAttributes::constClusterGraph ( ) const
inline

Returns the associated cluster graph.

Definition at line 153 of file ClusterGraphAttributes.h.

◆ destroyAttributes()

void ogdf::ClusterGraphAttributes::destroyAttributes ( long  attr)

Disables attributes specified by attr and releases available memory.

◆ destroyClusterAttributes()

void ogdf::ClusterGraphAttributes::destroyClusterAttributes ( long  attr)
private

Destroy all cluster-related attributes in attr.

Precondition
m_attributes already contains attr.

◆ fillBgColor() [1/4]

Color & ogdf::ClusterGraphAttributes::fillBgColor ( cluster  c)
inline

Returns the background color of fill patterns for cluster c.

Precondition
clusterStyle is enabled

Definition at line 336 of file ClusterGraphAttributes.h.

◆ fillBgColor() [2/4]

const Color & ogdf::ClusterGraphAttributes::fillBgColor ( cluster  c) const
inline

Returns the background color of fill patterns for cluster c.

Precondition
clusterStyle is enabled

Definition at line 327 of file ClusterGraphAttributes.h.

◆ fillBgColor() [3/4]

Color & ogdf::GraphAttributes::fillBgColor ( node  v)
inline

Returns the background color of fill patterns for node v.

Precondition
nodeStyle is enabled

Definition at line 546 of file GraphAttributes.h.

◆ fillBgColor() [4/4]

const Color & ogdf::GraphAttributes::fillBgColor ( node  v) const
inline

Returns the background color of fill patterns for node v.

Precondition
nodeStyle is enabled

Definition at line 537 of file GraphAttributes.h.

◆ fillColor() [1/4]

Color & ogdf::ClusterGraphAttributes::fillColor ( cluster  c)
inline

Returns the fill color of cluster c.

Precondition
clusterStyle is enabled

Definition at line 318 of file ClusterGraphAttributes.h.

◆ fillColor() [2/4]

const Color & ogdf::ClusterGraphAttributes::fillColor ( cluster  c) const
inline

Returns the fill color of cluster c.

Precondition
clusterStyle is enabled

Definition at line 309 of file ClusterGraphAttributes.h.

◆ fillColor() [3/4]

Color & ogdf::GraphAttributes::fillColor ( node  v)
inline

Returns the fill color of node v.

Precondition
nodeStyle is enabled

Definition at line 528 of file GraphAttributes.h.

◆ fillColor() [4/4]

const Color & ogdf::GraphAttributes::fillColor ( node  v) const
inline

Returns the fill color of node v.

Precondition
nodeStyle is enabled

Definition at line 519 of file GraphAttributes.h.

◆ fillPattern() [1/4]

FillPattern & ogdf::ClusterGraphAttributes::fillPattern ( cluster  c)
inline

Returns the fill pattern of cluster c.

Precondition
clusterStyle is enabled

Definition at line 300 of file ClusterGraphAttributes.h.

◆ fillPattern() [2/4]

const FillPattern & ogdf::ClusterGraphAttributes::fillPattern ( cluster  c) const
inline

Returns the fill pattern of cluster c.

Precondition
clusterStyle is enabled

Definition at line 291 of file ClusterGraphAttributes.h.

◆ fillPattern() [3/4]

FillPattern & ogdf::GraphAttributes::fillPattern ( node  v)
inline

Returns the fill pattern of node v.

Precondition
nodeStyle is enabled

Definition at line 510 of file GraphAttributes.h.

◆ fillPattern() [4/4]

FillPattern ogdf::GraphAttributes::fillPattern ( node  v) const
inline

Returns the fill pattern of node v.

Precondition
nodeStyle is enabled

Definition at line 501 of file GraphAttributes.h.

◆ flipHorizontal() [1/3]

virtual void ogdf::GraphAttributes::flipHorizontal ( )
inlinevirtual

Flips the layout horizontally within its bounding box.

If preserving the bounding box is not required, the layout can also be flipped horizontally by calling scale(-1.0, 1.0, false).

Reimplemented from ogdf::GraphAttributes.

Definition at line 933 of file GraphAttributes.h.

◆ flipHorizontal() [2/3]

virtual void ogdf::GraphAttributes::flipHorizontal ( const DRect box)
virtual

Flips the (whole) layout horizontally such that the part in box remains in this area.

The whole layout is flipped and then moved such that the part that was in box before flipping is moved to this area.

Reimplemented from ogdf::GraphAttributes.

◆ flipHorizontal() [3/3]

virtual void ogdf::ClusterGraphAttributes::flipHorizontal ( const DRect box)
overridevirtual

Flips the (whole) layout horizontally such that the part in box remains in this area.

The whole layout is flipped and then moved such that the part that was in box before flipping is moved to this area.

Reimplemented from ogdf::GraphAttributes.

◆ flipVertical() [1/3]

virtual void ogdf::GraphAttributes::flipVertical ( )
inlinevirtual

Flips the layout vertically within its bounding box.

If preserving the bounding box is not required, the layout can also be flipped vertically by calling scale(1.0, -1.0, false).

Reimplemented from ogdf::GraphAttributes.

Definition at line 919 of file GraphAttributes.h.

◆ flipVertical() [2/3]

virtual void ogdf::GraphAttributes::flipVertical ( const DRect box)
virtual

Flips the (whole) layout vertically such that the part in box remains in this area.

The whole layout is flipped and then moved such that the part that was in box before flipping is moved to this area.

Reimplemented from ogdf::GraphAttributes.

◆ flipVertical() [3/3]

virtual void ogdf::ClusterGraphAttributes::flipVertical ( const DRect box)
overridevirtual

Flips the (whole) layout vertically such that the part in box remains in this area.

The whole layout is flipped and then moved such that the part that was in box before flipping is moved to this area.

Reimplemented from ogdf::GraphAttributes.

◆ height() [1/6]

NodeArray< double > & ogdf::GraphAttributes::height ( )
inline

Returns a reference to the node array m_height.

Precondition
nodeGraphics is enabled

Definition at line 420 of file GraphAttributes.h.

◆ height() [2/6]

const NodeArray< double > & ogdf::GraphAttributes::height ( ) const
inline

Returns a reference to the node array m_height.

Precondition
nodeGraphics is enabled

Definition at line 411 of file GraphAttributes.h.

◆ height() [3/6]

double & ogdf::ClusterGraphAttributes::height ( cluster  c)
inline

Returns the height of cluster c.

Precondition
clusterGraphics is enabled

Definition at line 228 of file ClusterGraphAttributes.h.

◆ height() [4/6]

double ogdf::ClusterGraphAttributes::height ( cluster  c) const
inline

Returns the height of cluster c.

Precondition
clusterGraphics is enabled

Definition at line 219 of file ClusterGraphAttributes.h.

◆ height() [5/6]

double & ogdf::GraphAttributes::height ( node  v)
inline

Returns the height of the bounding box of node v.

Precondition
nodeGraphics is enabled

Definition at line 402 of file GraphAttributes.h.

◆ height() [6/6]

double ogdf::GraphAttributes::height ( node  v) const
inline

Returns the height of the bounding box of node v.

Precondition
nodeGraphics is enabled

Definition at line 393 of file GraphAttributes.h.

◆ init() [1/4]

void ogdf::ClusterGraphAttributes::init ( ClusterGraph cg,
long  attr = 0 
)

Initializes the ClusterGraphAttributes for ClusterGraph cg.

Parameters
cgis the new associated ClusterGraph.
attrspecifies the set of attributes that can be accessed.
Warning
All attributes that were allocated before are destroyed by this function! If you wish to extend the set of allocated attributes, use addAttributes.

◆ init() [2/4]

virtual void ogdf::GraphAttributes::init ( const Graph G,
long  attr 
)
privatevirtual

Forbidden initialization, use init(ClusterGraph &cg, long initAttributes) instead!

Reimplemented from ogdf::GraphAttributes.

◆ init() [3/4]

void ogdf::GraphAttributes::init ( long  attr)
private

Forbidden initialization, use init(ClusterGraph &cg, long initAttributes) instead!

◆ init() [4/4]

void ogdf::ClusterGraphAttributes::init ( long  attr = 0)

Re-initializes the ClusterGraphAttributes while maintaining the associated CluterGraph.

See also
init(const ClusterGraph&, long)

◆ label() [1/6]

string & ogdf::ClusterGraphAttributes::label ( cluster  c)
inline

Returns the label of cluster c.

Precondition
clusterLabel is enabled

Definition at line 354 of file ClusterGraphAttributes.h.

◆ label() [2/6]

const string & ogdf::ClusterGraphAttributes::label ( cluster  c) const
inline

Returns the label of cluster c.

Precondition
clusterLabel is enabled

Definition at line 345 of file ClusterGraphAttributes.h.

◆ label() [3/6]

string & ogdf::GraphAttributes::label ( edge  e)
inline

Returns the label of edge e.

Precondition
edgeLabel is enabled

Definition at line 765 of file GraphAttributes.h.

◆ label() [4/6]

const string & ogdf::GraphAttributes::label ( edge  e) const
inline

Returns the label of edge e.

Precondition
edgeLabel is enabled

Definition at line 756 of file GraphAttributes.h.

◆ label() [5/6]

string & ogdf::GraphAttributes::label ( node  v)
inline

Returns the label of node v.

Precondition
nodeLabel is enabled

Definition at line 564 of file GraphAttributes.h.

◆ label() [6/6]

const string & ogdf::GraphAttributes::label ( node  v) const
inline

Returns the label of node v.

Precondition
nodeLabel is enabled

Definition at line 555 of file GraphAttributes.h.

◆ scale() [1/3]

virtual void ogdf::GraphAttributes::scale ( double  s,
bool  scaleNodes = true 
)
inlinevirtual

Scales the layout by s.

If scaleNodes is true, node sizes are scaled as well.

Parameters
sis the scaling factor for both x- and y-coordinates.
scaleNodesdetermines if nodes size are scaled as well (true) or not.
Precondition
nodeGraphics and edgeGraphics are enabled

Reimplemented from ogdf::GraphAttributes.

Definition at line 902 of file GraphAttributes.h.

◆ scale() [2/3]

virtual void ogdf::GraphAttributes::scale ( double  sx,
double  sy,
bool  scaleNodes = true 
)
virtual

Scales the layout by (sx,sy).

If scaleNodes is true, node sizes are scaled as well.

Parameters
sxis the scaling factor for x-coordinates.
syis the scaling factor for y-coordinates.
scaleNodesdetermines if nodes size are scaled as well (true) or not.
Precondition
nodeGraphics and edgeGraphics are enabled

Reimplemented from ogdf::GraphAttributes.

◆ scale() [3/3]

virtual void ogdf::ClusterGraphAttributes::scale ( double  sx,
double  sy,
bool  scaleNodes = true 
)
overridevirtual

Scales the layout by (sx,sy).

If scaleNodes is true, node sizes are scaled as well.

Parameters
sxis the scaling factor for x-coordinates.
syis the scaling factor for y-coordinates.
scaleNodesdetermines if nodes size are scaled as well (true) or not.

Reimplemented from ogdf::GraphAttributes.

◆ strokeColor() [1/6]

Color & ogdf::ClusterGraphAttributes::strokeColor ( cluster  c)
inline

Returns the stroke color of cluster c.

Precondition
clusterStyle is enabled

Definition at line 264 of file ClusterGraphAttributes.h.

◆ strokeColor() [2/6]

const Color & ogdf::ClusterGraphAttributes::strokeColor ( cluster  c) const
inline

Returns the stroke color of cluster c.

Precondition
clusterStyle is enabled

Definition at line 255 of file ClusterGraphAttributes.h.

◆ strokeColor() [3/6]

Color & ogdf::GraphAttributes::strokeColor ( edge  e)
inline

Returns the stroke color of edge e.

Precondition
edgeStyle is enabled

Definition at line 729 of file GraphAttributes.h.

◆ strokeColor() [4/6]

const Color & ogdf::GraphAttributes::strokeColor ( edge  e) const
inline

Returns the stroke color of edge e.

Precondition
edgeStyle is enabled

Definition at line 720 of file GraphAttributes.h.

◆ strokeColor() [5/6]

Color & ogdf::GraphAttributes::strokeColor ( node  v)
inline

Returns the stroke color of node v.

Precondition
nodeStyle is enabled

Definition at line 474 of file GraphAttributes.h.

◆ strokeColor() [6/6]

const Color & ogdf::GraphAttributes::strokeColor ( node  v) const
inline

Returns the stroke color of node v.

Precondition
nodeStyle is enabled

Definition at line 465 of file GraphAttributes.h.

◆ strokeType() [1/6]

StrokeType & ogdf::ClusterGraphAttributes::strokeType ( cluster  c)
inline

Returns the stroke type of cluster c.

Precondition
clusterStyle is enabled

Definition at line 246 of file ClusterGraphAttributes.h.

◆ strokeType() [2/6]

const StrokeType & ogdf::ClusterGraphAttributes::strokeType ( cluster  c) const
inline

Returns the stroke type of cluster c.

Precondition
clusterStyle is enabled

Definition at line 237 of file ClusterGraphAttributes.h.

◆ strokeType() [3/6]

StrokeType & ogdf::GraphAttributes::strokeType ( edge  e)
inline

Returns the stroke type of edge e.

Precondition
edgeStyle is enabled

Definition at line 711 of file GraphAttributes.h.

◆ strokeType() [4/6]

StrokeType ogdf::GraphAttributes::strokeType ( edge  e) const
inline

Returns the stroke type of edge e.

Precondition
edgeStyle is enabled

Definition at line 702 of file GraphAttributes.h.

◆ strokeType() [5/6]

StrokeType & ogdf::GraphAttributes::strokeType ( node  v)
inline

Returns the stroke type of node v.

Precondition
nodeStyle is enabled

Definition at line 456 of file GraphAttributes.h.

◆ strokeType() [6/6]

StrokeType ogdf::GraphAttributes::strokeType ( node  v) const
inline

Returns the stroke type of node v.

Precondition
nodeStyle is enabled

Definition at line 447 of file GraphAttributes.h.

◆ strokeWidth() [1/6]

float & ogdf::ClusterGraphAttributes::strokeWidth ( cluster  c)
inline

Returns the stroke width of cluster c.

Precondition
clusterStyle is enabled

Definition at line 282 of file ClusterGraphAttributes.h.

◆ strokeWidth() [2/6]

const float & ogdf::ClusterGraphAttributes::strokeWidth ( cluster  c) const
inline

Returns the stroke width of cluster c.

Precondition
clusterStyle is enabled

Definition at line 273 of file ClusterGraphAttributes.h.

◆ strokeWidth() [3/6]

float & ogdf::GraphAttributes::strokeWidth ( edge  e)
inline

Returns the stroke width of edge e.

Precondition
edgeStyle is enabled

Definition at line 747 of file GraphAttributes.h.

◆ strokeWidth() [4/6]

float ogdf::GraphAttributes::strokeWidth ( edge  e) const
inline

Returns the stroke width of edge e.

Precondition
edgeStyle is enabled

Definition at line 738 of file GraphAttributes.h.

◆ strokeWidth() [5/6]

float & ogdf::GraphAttributes::strokeWidth ( node  v)
inline

Returns the stroke width of node v.

Precondition
nodeStyle is enabled

Definition at line 492 of file GraphAttributes.h.

◆ strokeWidth() [6/6]

float ogdf::GraphAttributes::strokeWidth ( node  v) const
inline

Returns the stroke width of node v.

Precondition
nodeStyle is enabled

Definition at line 483 of file GraphAttributes.h.

◆ templateCluster() [1/2]

string & ogdf::ClusterGraphAttributes::templateCluster ( cluster  c)
inline

Returns the template of cluster c.

Precondition
clusterTemplate is enabled

Definition at line 372 of file ClusterGraphAttributes.h.

◆ templateCluster() [2/2]

const string & ogdf::ClusterGraphAttributes::templateCluster ( cluster  c) const
inline

Returns the template of cluster c.

Precondition
clusterTemplate is enabled

Definition at line 363 of file ClusterGraphAttributes.h.

◆ translate()

virtual void ogdf::ClusterGraphAttributes::translate ( double  dx,
double  dy 
)
overridevirtual

Translates the layout by (dx,dy).

Parameters
dxis the translation in x-direction.
dyis the translation in y-direction.

Reimplemented from ogdf::GraphAttributes.

◆ updateClusterPositions()

void ogdf::ClusterGraphAttributes::updateClusterPositions ( double  boundaryDist = 1.0)

Updates positions of cluster boundaries wrt to children and child clusters.

◆ width() [1/6]

NodeArray< double > & ogdf::GraphAttributes::width ( )
inline

Returns a reference to the node array #m_width.

Precondition
nodeGraphics is enabled

Definition at line 384 of file GraphAttributes.h.

◆ width() [2/6]

const NodeArray< double > & ogdf::GraphAttributes::width ( ) const
inline

Returns a reference to the node array m_width.

Precondition
nodeGraphics is enabled

Definition at line 375 of file GraphAttributes.h.

◆ width() [3/6]

double & ogdf::ClusterGraphAttributes::width ( cluster  c)
inline

Returns the width of cluster c.

Precondition
clusterGraphics is enabled

Definition at line 210 of file ClusterGraphAttributes.h.

◆ width() [4/6]

double ogdf::ClusterGraphAttributes::width ( cluster  c) const
inline

Returns the width of cluster c.

Precondition
clusterGraphics is enabled

Definition at line 201 of file ClusterGraphAttributes.h.

◆ width() [5/6]

double & ogdf::GraphAttributes::width ( node  v)
inline

Returns the width of the bounding box of node v.

Precondition
nodeGraphics is enabled

Definition at line 366 of file GraphAttributes.h.

◆ width() [6/6]

double ogdf::GraphAttributes::width ( node  v) const
inline

Returns the width of the bounding box of node v.

Precondition
nodeGraphics is enabled

Definition at line 357 of file GraphAttributes.h.

◆ x() [1/4]

double & ogdf::ClusterGraphAttributes::x ( cluster  c)
inline

Returns the x-position of cluster c's cage (lower left corner).

Precondition
clusterGraphics is enabled

Definition at line 174 of file ClusterGraphAttributes.h.

◆ x() [2/4]

double ogdf::ClusterGraphAttributes::x ( cluster  c) const
inline

Returns the x-position of cluster c's cage (lower left corner).

Precondition
clusterGraphics is enabled

Definition at line 165 of file ClusterGraphAttributes.h.

◆ x() [3/4]

double & ogdf::GraphAttributes::x ( node  v)
inline

Returns the x-coordinate of node v.

Precondition
nodeGraphics is enabled

Definition at line 256 of file GraphAttributes.h.

◆ x() [4/4]

double ogdf::GraphAttributes::x ( node  v) const
inline

Returns the x-coordinate of node v.

Precondition
nodeGraphics is enabled

Definition at line 247 of file GraphAttributes.h.

◆ y() [1/4]

double & ogdf::ClusterGraphAttributes::y ( cluster  c)
inline

Returns the y-position of cluster c's cage (lower left corner).

Precondition
clusterGraphics is enabled

Definition at line 192 of file ClusterGraphAttributes.h.

◆ y() [2/4]

double ogdf::ClusterGraphAttributes::y ( cluster  c) const
inline

Returns the y-position of cluster c's cage (lower left corner).

Precondition
clusterGraphics is enabled

Definition at line 183 of file ClusterGraphAttributes.h.

◆ y() [3/4]

double & ogdf::GraphAttributes::y ( node  v)
inline

Returns the y-coordinate of node v.

Precondition
nodeGraphics is enabled

Definition at line 274 of file GraphAttributes.h.

◆ y() [4/4]

double ogdf::GraphAttributes::y ( node  v) const
inline

Returns the y-coordinate of node v.

Precondition
nodeGraphics is enabled

Definition at line 265 of file GraphAttributes.h.

Member Data Documentation

◆ all

const long ogdf::ClusterGraphAttributes::all
static

Enables all available flags.

Definition at line 81 of file ClusterGraphAttributes.h.

◆ clusterGraphics

const long ogdf::ClusterGraphAttributes::clusterGraphics
static

Corresponds to cluster attributes x(cluster), y(cluster), width(cluster), height(cluster).

Definition at line 67 of file ClusterGraphAttributes.h.

◆ clusterLabel

const long ogdf::ClusterGraphAttributes::clusterLabel
static

Corresponds to cluster attribute label(cluster).

Definition at line 75 of file ClusterGraphAttributes.h.

◆ clusterStyle

const long ogdf::ClusterGraphAttributes::clusterStyle
static

◆ clusterTemplate

const long ogdf::ClusterGraphAttributes::clusterTemplate
static

Corresponds to cluster attribute templateCluster(cluster).

Definition at line 78 of file ClusterGraphAttributes.h.

◆ m_clusterTemplate

ClusterArray<string> ogdf::ClusterGraphAttributes::m_clusterTemplate
protected

Name of cluster template.

Definition at line 57 of file ClusterGraphAttributes.h.

◆ m_fill

ClusterArray<Fill> ogdf::ClusterGraphAttributes::m_fill
protected

Fill (style of interior)

Definition at line 56 of file ClusterGraphAttributes.h.

◆ m_height

ClusterArray<double> ogdf::ClusterGraphAttributes::m_height
protected

Cluster height.

Definition at line 53 of file ClusterGraphAttributes.h.

◆ m_label

ClusterArray<string> ogdf::ClusterGraphAttributes::m_label
protected

Cluster label.

Definition at line 54 of file ClusterGraphAttributes.h.

◆ m_pClusterGraph

const ClusterGraph* ogdf::ClusterGraphAttributes::m_pClusterGraph
protected

Only points to existing graphs.

Definition at line 48 of file ClusterGraphAttributes.h.

◆ m_stroke

ClusterArray<Stroke> ogdf::ClusterGraphAttributes::m_stroke
protected

Stroke (style of boundary)

Definition at line 55 of file ClusterGraphAttributes.h.

◆ m_width

ClusterArray<double> ogdf::ClusterGraphAttributes::m_width
protected

Cluster width.

Definition at line 52 of file ClusterGraphAttributes.h.

◆ m_x

ClusterArray<double> ogdf::ClusterGraphAttributes::m_x
protected

X-position of lower left corner.

Definition at line 50 of file ClusterGraphAttributes.h.

◆ m_y

ClusterArray<double> ogdf::ClusterGraphAttributes::m_y
protected

Y-position of lower left corner.

Definition at line 51 of file ClusterGraphAttributes.h.


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