Open
Graph Drawing
Framework

 v.2012.07
 

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:

List of all members.

Public Member Functions

 ClusterGraphAttributes ()
 Initializes new instance of class ClusterGraphAttributes.
 ClusterGraphAttributes (ClusterGraph &cg, long initAttributes=0)
virtual ~ClusterGraphAttributes ()
const DRect boundingBox () const
 Returns bounding box.
const StringclusterBackColor (cluster c) const
StringclusterBackColor (cluster c)
const StringclusterColor (cluster c) const
 Returns line color stored for cluster c in string format.
StringclusterColor (cluster c)
 Returns line color of cluster c in string format.
const StringclusterFillColor (int clusterID) const
 Returns cluster fill color.
StringclusterFillColor (int clusterID)
 Returns cluster fill color.
const StringclusterFillColor (cluster c) const
StringclusterFillColor (cluster c)
GraphAttributes::BrushPattern clusterFillPattern (int clusterID) const
 Returns cluster fill pattern.
GraphAttributes::BrushPatternclusterFillPattern (int clusterID)
 Returns cluster fill pattern.
const
GraphAttributes::BrushPattern
clusterFillPattern (cluster c) const
 Returns brush pattern of cluster c.
GraphAttributes::BrushPatternclusterFillPattern (cluster c)
 Returns brush pattern of cluster c.
double clusterHeight (int clusterID) const
 Returns cluster cage height.
double & clusterHeight (int clusterID)
 Returns cluster cage height.
double clusterHeight (cluster c) const
 Returns cluster cage height.
double & clusterHeight (cluster c)
 Returns cluster cage height.
int clusterID (node v)
 Returns the index of the parent cluster of node v.
const ClusterInfoclusterInfo (int clusterID) const
 Returns structure containing information on cluster with ID clusterID.
ClusterInfoclusterInfo (int clusterID)
 Returns structure containing information on cluster with ID clusterID.
const ClusterInfoclusterInfo (cluster c) const
 Returns const reference to structure containing information on cluster c.
ClusterInfoclusterInfo (cluster c)
 Returns reference to structure containing information on cluster c.
const StringclusterLabel (int clusterID) const
 Returns label of cluster c.
StringclusterLabel (int clusterID)
 Returns label of cluster c.
const StringclusterLabel (cluster c) const
 Returns label of cluster c.
StringclusterLabel (cluster c)
 Returns label of cluster c.
const GraphAttributes::EdgeStyleclusterLineStyle (cluster c) const
 Returns edge style of cluster c.
GraphAttributes::EdgeStyleclusterLineStyle (cluster c)
 Returns line style of cluster c.
double clusterLineWidth (int clusterID) const
 Returns cluster line width.
double & clusterLineWidth (int clusterID)
 Returns cluster line width.
const double & clusterLineWidth (cluster c) const
 Returns line width of cluster c.
double & clusterLineWidth (cluster c)
 Returns line width of cluster c.
cluster clusterOf (node v)
 Returns the parent cluster of node v.
double clusterWidth (int clusterID) const
 Returns cluster cage width.
double & clusterWidth (int clusterID)
 Returns cluster cage width.
double clusterWidth (cluster c) const
 Returns cluster cage width.
double & clusterWidth (cluster c)
 Returns cluster cage width.
double clusterXPos (int clusterID) const
 Returns x position of the cluster cages lower left corner.
double & clusterXPos (int clusterID)
 Returns x position of the cluster cages lower left corner.
double clusterXPos (cluster c) const
 Returns x position of the cluster cages lower left corner.
double & clusterXPos (cluster c)
 Returns x position of the cluster cages lower left corner.
double clusterYPos (int clusterID) const
 Returns y position of the cluster cages lower left corner.
double & clusterYPos (int clusterID)
 Returns y position of the cluster cages lower left corner.
double clusterYPos (cluster c) const
 Returns y position of the cluster cages lower left corner.
double & clusterYPos (cluster c)
 Returns y position of the cluster cages lower left corner.
const ClusterGraphconstClusterGraph () const
 Returns the ClusterGraph.
virtual void init (ClusterGraph &cg, long initAttributes=0)
virtual void initAtt (long initAttributes=0)
 Initializes the attributes according to initAttributes.
int maxClusterID () const
 Returns the maximum cluster index used.
bool readClusterGML (const char *fileName, ClusterGraph &CG, Graph &G)
 Reads attributed clustergraph in GML format from file fileName.
bool readClusterGML (istream &is, ClusterGraph &CG, Graph &G)
 Reads attributed clustergraph in GML format from input stream is.
bool readClusterGraphOGML (const char *fileName, ClusterGraph &CG, Graph &G)
 Reads clustered graph from OGML-file.
void setClusterFillPattern (cluster c, int i)
 Set fill pattern i for cluster c.
void setClusterLineStyle (cluster c, int i)
 Set style i for cluster c.
const StringtemplateCluster (cluster c) const
 Returns const reference to template of cluster c.
StringtemplateCluster (cluster c)
 Returns reference to template of cluster c.
void updateClusterPositions (double boundaryDist=1.0)
 Updates positions of cluster boundaries wrt to children and child clusters.
void writeGML (const char *fileName)
 Writes attributed clustergraph in GML format to file fileName.
void writeGML (ostream &os)
 Writes attributed clustergraph in GML format to output stream os.
void writeOGML (const char *fileName)
 Writes attributed clustergraph in OGML format to file fileName.
void writeOGML (ostream &os)
 Writes attributed clustergraph in OGML format to output stream os.
- Public Member Functions inherited from ogdf::GraphAttributes
 GraphAttributes ()
 Constructs graph attributes for no associated graph (default constructor).
 GraphAttributes (const Graph &G, long initAttributes=nodeGraphics|edgeGraphics)
 Constructs graph attributes associated with the graph G.
virtual ~GraphAttributes ()
void addNodeCenter2Bends (int mode=1)
void addSubGraph (edge e, int n)
 Addes edge e to basic graph n.
const EdgeArrowarrowEdge (edge e) const
 Returns the arrow type of edge e.
EdgeArrowarrowEdge (edge e)
 Returns the arrow type of edge e.
long attributes () const
 Returns currently accessible attributes.
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.
void clearAllBends ()
const StringcolorEdge (edge e) const
 Returns the color of node v.
StringcolorEdge (edge e)
 Returns the color of node v.
const StringcolorNode (node v) const
 Returns the color of node v.
StringcolorNode (node v)
 Returns the color of node v.
const GraphconstGraph () const
 Returns a reference to the associated graph.
void destroyAttributes (long attr)
 Destroys attributes in attr.
bool directed ()
 Returns if the graph is directed.
void directed (bool directed)
 Sets if the graph is directed to directed.
const double & doubleWeight (edge e) const
 Returns the (real number) weight of edge e.
double & doubleWeight (edge e)
 Returns the (real number) weight of edge e.
const double & edgeWidth (edge e) const
 Returns the line width of edge e.
double & edgeWidth (edge e)
 Returns the line width of edge e.
const NodeArray< double > & height () const
 Returns a reference to the NodeArray m_height.
NodeArray< double > & height ()
 Returns a refeence to the NodeArray m_height.
const double & height (node v) const
 Returns the height of the bounding box of node v.
double & height (node v)
 Returns the height of the bounding box of node v.
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.
const int & idNode (node v) const
 Returns the user ID of node v.
int & idNode (node v)
 Returns the user ID of node v.
const ImageAlignmentimageAlignmentNode (node v) const
ImageAlignmentimageAlignmentNode (node v)
const bool & imageDrawLineNode (node v) const
 Returns bool value drawLine of node v.
bool & imageDrawLineNode (node v)
 Returns bool value drawLine of node v.
const double & imageHeightNode (node v) const
double & imageHeightNode (node v)
const ImageStyleimageStyleNode (node v) const
 Returns image style of node v.
ImageStyleimageStyleNode (node v)
 Returns image style of node v.
const StringimageUriNode (node v) const
 Returns image uri of node v.
StringimageUriNode (node v)
 Returns image uri of node v.
const double & imageWidthNode (node v) const
 Returns image width of node v.
double & imageWidthNode (node v)
 Returns image width of node v.
virtual void init (const Graph &G, long initAttr)
 Initializes the graph attributes for graph G.
void initAttributes (long attr)
 Initializes attributes in attr for usage.
bool inSubGraph (edge e, int n) const
 Checks whether edge e belongs to basic graph n.
const int & intWeight (edge e) const
 Returns the (integer) weight of edge e.
int & intWeight (edge e)
 Returns the (integer) weight of edge e.
bool isAssociationClass (node v) const
const StringlabelEdge (edge e) const
 Returns the label of edge e.
StringlabelEdge (edge e)
 Returns the label of edge e.
const StringlabelNode (node v) const
 Returns the label of node \ v.
StringlabelNode (node v)
 Returns the label of node \ v.
const int & level (node v) const
 Returns the level of node v.
int & level (node v)
 Returns the level of node v.
const double & lineWidthNode (node v) const
 Returns the line width of node v.
double & lineWidthNode (node v)
 Returns the line width of node v.
const StringnodeLine (node v) const
 Returns the line color of node v.
StringnodeLine (node v)
 Returns the line color of node v.
const BrushPatternnodePattern (node v) const
 Returns the brush pattern of node v.
BrushPatternnodePattern (node v)
 Returns the brush pattern of node v.
bool readGML (Graph &G, const String &fileName)
 Reads the graph from a GML file fileName.
bool readGML (Graph &G, istream &is)
 Reads the graph from a GML input stream is.
bool readRudy (Graph &G, const String &fileName)
 Reads a graph in Rudy format from file fileName.
bool readRudy (Graph &G, istream &is)
 Reads a graph in Rudy format from input stream is.
bool readXML (Graph &G, const String &fileName)
 Reads the graph and attributes from the XML file fileName.
bool readXML (Graph &G, istream &is)
 Reads the graph and attributes from the XML input stream is.
void removeSubGraph (edge e, int n)
 Removes edge e from basic graph n.
void removeUnnecessaryBendsHV ()
 Removes unnecessary bend points in orthogonal segements.
void setAllHeight (double h)
 Sets the height of all nodes to h.
void setAllWidth (double w)
 Sets the width of all nodes to w.
int shapeNode (node v) const
 Returns the shape type of node v.
int & shapeNode (node v)
 Returns the shape type of node v.
const EdgeStylestyleEdge (edge e) const
 Returns the line style of an edge e.
EdgeStylestyleEdge (edge e)
 Returns the line style of an edge e.
const EdgeStylestyleNode (node v) const
 Returns the line style of node \ v.
EdgeStylestyleNode (node v)
 Returns the line style of node \ v.
const unsigned int & subGraphBits (edge e) const
 Returns the edgesubgraph value of an edge e.
unsigned int & subGraphBits (edge e)
 Returns the edgesubgraph value of an edge e.
const StringtemplateNode (node v) const
 Returns the template name of node v.
StringtemplateNode (node v)
 Returns the template name of node v.
Graph::EdgeType type (edge e) const
 Returns the type of edge e.
Graph::EdgeTypetype (edge e)
 Returns the type of edge e.
Graph::NodeType type (node v) const
 Returns the type of node v.
Graph::NodeTypetype (node v)
 Returns the type of node v.
const int & weight (node v) const
 Returns the weight of node v.
int & weight (node v)
 Returns the weight of node v.
const NodeArray< double > & width () const
 Returns a reference to the NodeArray m_width.
NodeArray< double > & width ()
 Returns a refeence to the NodeArray m_width.
const double & width (node v) const
 Returns the width of the bounding box of node v.
double & width (node v)
 Returns the width of the bounding box of node v.
void writeGML (const String &fileName) const
 Writes the graph with its attributes in GML format to file fileName.
void writeGML (ostream &os) const
 Writes the graph with its attributes in GML format to output stream os.
void writeRudy (const String &fileName) const
 Writes the graph in Rudy format to file fileName.
void writeRudy (ostream &os) const
 Writes the graph in Rudy format to output stream os.
void writeSVG (const String &fileName, int fontSize=3, const String &fontColor="#000000") const
 Writes the graph with its attributes in SVG format to file fileName.
void writeSVG (ostream &os, int fontSize, const String &fontColor) const
 Writes the graph with its attributes in SVG format to output stream os.
void writeXML (const String &fileName, const char *delimiter="", const char *offset="") const
 Writes the graph to the XML file fileName.
virtual void writeXML (ostream &os, const char *delimiter="", const char *offset="") const
 Writes the graph to XML output stream os.
const double & x (node v) const
 Returns the x-coordinate of node v.
double & x (node v)
 Returns the x-coordinate of node v.
const double & y (node v) const
 Returns the y-coordinate of node v.
double & y (node v)
 Returns the y-coordinate of node v.

Protected Attributes

const ClusterGraphm_pClusterGraph
 Only points to existing graphs.
- 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< double > m_doubleWeight
 (real number) weight of an edge
EdgeArray< EdgeArrowm_edgeArrow
 arrow type of an edge
EdgeArray< Stringm_edgeColor
 line color of an edge
EdgeArray< Stringm_edgeLabel
 label of an edge
EdgeArray< EdgeStylem_edgeStyle
 line style of an edge
EdgeArray< double > m_edgeWidth
 line width of an edge
EdgeArray< Graph::EdgeTypem_eType
 type of an edge (association or generalization)
NodeArray< double > m_height
 height of a nodes's bounding box
NodeArray< ImageAlignmentm_imageAlign
NodeArray< bool > m_imageDrawLine
NodeArray< double > m_imageHeight
NodeArray< ImageStylem_imageStyle
NodeArray< Stringm_imageUri
NodeArray< double > m_imageWidth
EdgeArray< int > m_intWeight
 (integer) weight of an edge
NodeArray< int > m_level
 level of a node
NodeArray< Stringm_nodeColor
 color of a node
NodeArray< int > m_nodeId
 user ID of a node
NodeArray< int > m_nodeIntWeight
 (integer) weight of a node
NodeArray< Stringm_nodeLabel
 label of a node
NodeArray< Stringm_nodeLine
 line color of a node
NodeArray< double > m_nodeLineWidth
 line width of a node
NodeArray< BrushPatternm_nodePattern
 brush pattern of a node
NodeArray< int > m_nodeShape
 shape of a node
NodeArray< EdgeStylem_nodeStyle
 line style of a node
NodeArray< Stringm_nodeTemplate
 name of template of a node
const Graphm_pGraph
 associated graph
EdgeArray< unsigned int > m_subGraph
 is element of subgraphs given by bitvector
NodeArray< Graph::NodeTypem_vType
NodeArray< double > m_width
 width of a node's bounding box
NodeArray< double > m_x
 x-coordinate of a node
NodeArray< double > m_y
 y-coordinate pf a node

Private Member Functions

bool readClusterGraphGML (const char *fileName, ClusterGraph &CG, Graph &G, GmlParser &gml)
bool readClusterGraphGML (ClusterGraph &CG, Graph &G, GmlParser &gml)
 Reads clustered graph from input stream of GmlParser.
void writeCluster (ostream &os, NodeArray< int > &nId, ClusterArray< int > &cId, int &nextId, cluster c, String indent)
 Recursively writes the cluster structure in GML format into output stream os.
void writeClusterOGML (ostream &os, std::ostringstream &osS, int &nextLabelId, cluster cluster, int &indentDepth, int indentDepthS)
 Recursively writes the cluster structure in OGML.
void writeGraphWinCluster (ostream &os, NodeArray< int > &nId, int &nextId, cluster c, String indent)
 Recursively writes the cluster structure in GraphWin GML format.

Private Attributes

HashArray< int, ClusterInfom_clusterInfo
 Information on the cluster positions, index is cluster ID.
ClusterArray< Stringm_clusterTemplate
 Name of cluster template.

Additional Inherited Members

- Public Types inherited from ogdf::GraphAttributes
enum  {
  nodeGraphics = 0x00001, edgeGraphics = 0x00002, nodeLevel = 0x00004, edgeIntWeight = 0x00008, edgeDoubleWeight = 0x00010, edgeLabel = 0x00020, nodeLabel = 0x00040, edgeType = 0x00080, nodeType = 0x00100, nodeColor = 0x00200, nodeId = 0x00400, edgeArrow = 0x00800, edgeColor = 0x01000, edgeStyle = 0x02000,
  nodeStyle = 0x04000, nodeTemplate = 0x08000, edgeSubGraph = 0x10000, nodeWeight = 0x20000
}
 Bits for specifying attributes. More...
enum  { oval = 0x8001, rectangle = 0x8002 }
 Bits for specifying node shapes. More...
enum  BrushPattern {
  bpNone = 0, bpSolid = 1, bpDense1 = 2, bpDense2 = 3, bpDense3 = 4, bpDense4 = 5, bpDense5 = 6, bpDense6 = 7, bpDense7 = 8, bpHorizontal = 9, bpVertical = 10, bpCross = 11, BackwardDiagonal = 12, ForwardDiagonal = 13,
  DiagonalCross = 14
}
 Types for object brush patterns. More...
enum  EdgeArrow { none, last, first, both, undefined }
 Types for edge arrows. More...
enum  EdgeStyle { esNoPen = 0, esSolid = 1, esDash = 2, esDot = 3, esDashdot = 4, esDashdotdot = 5 }
 Types for line styles. More...
enum  ImageAlignment { TopLeft = 0, TopCenter, TopRight, CenterLeft, Center, CenterRight, BottomLeft, BottomCenter, BottomRight }
 Specifies image alignment. More...
enum  ImageStyle { FreeScale = 0, FixScale = 1 }
 Specifies scaling of images. More...
- Static Public Member Functions inherited from ogdf::GraphAttributes
static ImageAlignment intToImageAlignment (int i)
 Helper function mapping int values to image alignment.
static ImageStyle intToImageStyle (int i)
 Helper function mapping int values to image styles.
static BrushPattern intToPattern (int i)
 Converts integer i to brush pattern.
static EdgeStyle intToStyle (int i)
 Converts integer i to edge style.
- Protected Member Functions inherited from ogdf::GraphAttributes
String formatLabel (const String &labelText)
 Static helper method for exchanging X(HT)ML-tag specific chars.
void writeLongString (ostream &os, const String &str) const
- Static Protected Member Functions inherited from ogdf::GraphAttributes
static const char * brushPatternToOGML (const GraphAttributes::BrushPattern &brushPattern)
 Static helper method for mapping brush patterns styles to ogml.
static const char * edgeStyleToOGML (const GraphAttributes::EdgeStyle &edgeStyle)
 Static helper method for mapping edge styles to ogml.
static const char * imageAlignmentToOGML (const GraphAttributes::ImageAlignment &imgAlign)
 Static helper method for mapping image alignments to ogml.
static const char * imageStyleToOGML (const GraphAttributes::ImageStyle &imgStyle)
 Static helper method for mapping image style to ogml.

Detailed Description

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

Attributes are simply stored in node or edge arrays; for memory consumption reasons, only a subset of these arrays is in fact initialized for the graph; non-initialized arrays require only a few bytes of extra memory.

Which arrays are initialized is specified by a bit vector; each bit in this bit vector corresponds to one or more attributes. E.g., nodeGraphics corresponds to the attributes m_x, m_y, m_width, and m_height; whereas edgeDoubleWeight only corresponds to the attribute m_doubleWeight.

Definition at line 106 of file ClusterGraphAttributes.h.


Constructor & Destructor Documentation

ogdf::ClusterGraphAttributes::ClusterGraphAttributes ( )
inline

Initializes new instance of class ClusterGraphAttributes.

Definition at line 113 of file ClusterGraphAttributes.h.

ogdf::ClusterGraphAttributes::ClusterGraphAttributes ( ClusterGraph cg,
long  initAttributes = 0 
)

Initializes new instance of class ClusterGraphAttributes. Uses initAttributes, which are enriched by node and edge graphics.

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

Definition at line 120 of file ClusterGraphAttributes.h.


Member Function Documentation

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

Returns bounding box.

Reimplemented from ogdf::GraphAttributes.

const String& ogdf::ClusterGraphAttributes::clusterBackColor ( cluster  c) const
inline

Definition at line 295 of file ClusterGraphAttributes.h.

String& ogdf::ClusterGraphAttributes::clusterBackColor ( cluster  c)
inline

Definition at line 300 of file ClusterGraphAttributes.h.

const String& ogdf::ClusterGraphAttributes::clusterColor ( cluster  c) const
inline

Returns line color stored for cluster c in string format.

Definition at line 275 of file ClusterGraphAttributes.h.

String& ogdf::ClusterGraphAttributes::clusterColor ( cluster  c)
inline

Returns line color of cluster c in string format.

Definition at line 280 of file ClusterGraphAttributes.h.

const String& ogdf::ClusterGraphAttributes::clusterFillColor ( int  clusterID) const
inline

Returns cluster fill color.

Definition at line 187 of file ClusterGraphAttributes.h.

String& ogdf::ClusterGraphAttributes::clusterFillColor ( int  clusterID)
inline

Returns cluster fill color.

Definition at line 192 of file ClusterGraphAttributes.h.

const String& ogdf::ClusterGraphAttributes::clusterFillColor ( cluster  c) const
inline

Definition at line 285 of file ClusterGraphAttributes.h.

String& ogdf::ClusterGraphAttributes::clusterFillColor ( cluster  c)
inline

Definition at line 290 of file ClusterGraphAttributes.h.

GraphAttributes::BrushPattern ogdf::ClusterGraphAttributes::clusterFillPattern ( int  clusterID) const
inline

Returns cluster fill pattern.

Definition at line 197 of file ClusterGraphAttributes.h.

GraphAttributes::BrushPattern& ogdf::ClusterGraphAttributes::clusterFillPattern ( int  clusterID)
inline

Returns cluster fill pattern.

Definition at line 202 of file ClusterGraphAttributes.h.

const GraphAttributes::BrushPattern& ogdf::ClusterGraphAttributes::clusterFillPattern ( cluster  c) const
inline

Returns brush pattern of cluster c.

Definition at line 318 of file ClusterGraphAttributes.h.

GraphAttributes::BrushPattern& ogdf::ClusterGraphAttributes::clusterFillPattern ( cluster  c)
inline

Returns brush pattern of cluster c.

Definition at line 323 of file ClusterGraphAttributes.h.

double ogdf::ClusterGraphAttributes::clusterHeight ( int  clusterID) const
inline

Returns cluster cage height.

Definition at line 165 of file ClusterGraphAttributes.h.

double& ogdf::ClusterGraphAttributes::clusterHeight ( int  clusterID)
inline

Returns cluster cage height.

Definition at line 168 of file ClusterGraphAttributes.h.

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

Returns cluster cage height.

Definition at line 241 of file ClusterGraphAttributes.h.

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

Returns cluster cage height.

Definition at line 244 of file ClusterGraphAttributes.h.

int ogdf::ClusterGraphAttributes::clusterID ( node  v)
inline

Returns the index of the parent cluster of node v.

Definition at line 138 of file ClusterGraphAttributes.h.

const ClusterInfo& ogdf::ClusterGraphAttributes::clusterInfo ( int  clusterID) const
inline

Returns structure containing information on cluster with ID clusterID.

Definition at line 217 of file ClusterGraphAttributes.h.

ClusterInfo& ogdf::ClusterGraphAttributes::clusterInfo ( int  clusterID)
inline

Returns structure containing information on cluster with ID clusterID.

Definition at line 222 of file ClusterGraphAttributes.h.

const ClusterInfo& ogdf::ClusterGraphAttributes::clusterInfo ( cluster  c) const
inline

Returns const reference to structure containing information on cluster c.

Definition at line 269 of file ClusterGraphAttributes.h.

ClusterInfo& ogdf::ClusterGraphAttributes::clusterInfo ( cluster  c)
inline

Returns reference to structure containing information on cluster c.

Definition at line 272 of file ClusterGraphAttributes.h.

const String& ogdf::ClusterGraphAttributes::clusterLabel ( int  clusterID) const
inline

Returns label of cluster c.

Definition at line 207 of file ClusterGraphAttributes.h.

String& ogdf::ClusterGraphAttributes::clusterLabel ( int  clusterID)
inline

Returns label of cluster c.

Definition at line 212 of file ClusterGraphAttributes.h.

const String& ogdf::ClusterGraphAttributes::clusterLabel ( cluster  c) const
inline

Returns label of cluster c.

Definition at line 253 of file ClusterGraphAttributes.h.

String& ogdf::ClusterGraphAttributes::clusterLabel ( cluster  c)
inline

Returns label of cluster c.

Definition at line 258 of file ClusterGraphAttributes.h.

const GraphAttributes::EdgeStyle& ogdf::ClusterGraphAttributes::clusterLineStyle ( cluster  c) const
inline

Returns edge style of cluster c.

Definition at line 308 of file ClusterGraphAttributes.h.

GraphAttributes::EdgeStyle& ogdf::ClusterGraphAttributes::clusterLineStyle ( cluster  c)
inline

Returns line style of cluster c.

Definition at line 313 of file ClusterGraphAttributes.h.

double ogdf::ClusterGraphAttributes::clusterLineWidth ( int  clusterID) const
inline

Returns cluster line width.

Definition at line 177 of file ClusterGraphAttributes.h.

double& ogdf::ClusterGraphAttributes::clusterLineWidth ( int  clusterID)
inline

Returns cluster line width.

Definition at line 182 of file ClusterGraphAttributes.h.

const double& ogdf::ClusterGraphAttributes::clusterLineWidth ( cluster  c) const
inline

Returns line width of cluster c.

Definition at line 328 of file ClusterGraphAttributes.h.

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

Returns line width of cluster c.

Definition at line 333 of file ClusterGraphAttributes.h.

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

Returns the parent cluster of node v.

Definition at line 141 of file ClusterGraphAttributes.h.

double ogdf::ClusterGraphAttributes::clusterWidth ( int  clusterID) const
inline

Returns cluster cage width.

Definition at line 171 of file ClusterGraphAttributes.h.

double& ogdf::ClusterGraphAttributes::clusterWidth ( int  clusterID)
inline

Returns cluster cage width.

Definition at line 174 of file ClusterGraphAttributes.h.

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

Returns cluster cage width.

Definition at line 247 of file ClusterGraphAttributes.h.

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

Returns cluster cage width.

Definition at line 250 of file ClusterGraphAttributes.h.

double ogdf::ClusterGraphAttributes::clusterXPos ( int  clusterID) const
inline

Returns x position of the cluster cages lower left corner.

Definition at line 153 of file ClusterGraphAttributes.h.

double& ogdf::ClusterGraphAttributes::clusterXPos ( int  clusterID)
inline

Returns x position of the cluster cages lower left corner.

Definition at line 156 of file ClusterGraphAttributes.h.

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

Returns x position of the cluster cages lower left corner.

Definition at line 229 of file ClusterGraphAttributes.h.

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

Returns x position of the cluster cages lower left corner.

Definition at line 232 of file ClusterGraphAttributes.h.

double ogdf::ClusterGraphAttributes::clusterYPos ( int  clusterID) const
inline

Returns y position of the cluster cages lower left corner.

Definition at line 159 of file ClusterGraphAttributes.h.

double& ogdf::ClusterGraphAttributes::clusterYPos ( int  clusterID)
inline

Returns y position of the cluster cages lower left corner.

Definition at line 162 of file ClusterGraphAttributes.h.

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

Returns y position of the cluster cages lower left corner.

Definition at line 235 of file ClusterGraphAttributes.h.

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

Returns y position of the cluster cages lower left corner.

Definition at line 238 of file ClusterGraphAttributes.h.

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

Returns the ClusterGraph.

Definition at line 135 of file ClusterGraphAttributes.h.

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

Initializes the instance with ClusterGraph cg. Sets the attributes to initAttributes

virtual void ogdf::ClusterGraphAttributes::initAtt ( long  initAttributes = 0)
inlinevirtual

Initializes the attributes according to initAttributes.

Definition at line 127 of file ClusterGraphAttributes.h.

int ogdf::ClusterGraphAttributes::maxClusterID ( ) const
inline

Returns the maximum cluster index used.

Definition at line 144 of file ClusterGraphAttributes.h.

bool ogdf::ClusterGraphAttributes::readClusterGML ( const char *  fileName,
ClusterGraph CG,
Graph G 
)

Reads attributed clustergraph in GML format from file fileName.

bool ogdf::ClusterGraphAttributes::readClusterGML ( istream &  is,
ClusterGraph CG,
Graph G 
)

Reads attributed clustergraph in GML format from input stream is.

bool ogdf::ClusterGraphAttributes::readClusterGraphGML ( const char *  fileName,
ClusterGraph CG,
Graph G,
GmlParser gml 
)
private

Reads Cluster Graph with Attributes, base graph G, from fileName with a given gmlparser gml (has objecttree). Input stream given by parser.

bool ogdf::ClusterGraphAttributes::readClusterGraphGML ( ClusterGraph CG,
Graph G,
GmlParser gml 
)
private

Reads clustered graph from input stream of GmlParser.

bool ogdf::ClusterGraphAttributes::readClusterGraphOGML ( const char *  fileName,
ClusterGraph CG,
Graph G 
)

Reads clustered graph from OGML-file.

void ogdf::ClusterGraphAttributes::setClusterFillPattern ( cluster  c,
int  i 
)
inline

Set fill pattern i for cluster c.

Definition at line 338 of file ClusterGraphAttributes.h.

void ogdf::ClusterGraphAttributes::setClusterLineStyle ( cluster  c,
int  i 
)
inline

Set style i for cluster c.

Definition at line 343 of file ClusterGraphAttributes.h.

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

Returns const reference to template of cluster c.

Definition at line 263 of file ClusterGraphAttributes.h.

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

Returns reference to template of cluster c.

Definition at line 266 of file ClusterGraphAttributes.h.

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

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

void ogdf::ClusterGraphAttributes::writeCluster ( ostream &  os,
NodeArray< int > &  nId,
ClusterArray< int > &  cId,
int &  nextId,
cluster  c,
String  indent 
)
private

Recursively writes the cluster structure in GML format into output stream os.

void ogdf::ClusterGraphAttributes::writeClusterOGML ( ostream &  os,
std::ostringstream &  osS,
int &  nextLabelId,
cluster  cluster,
int &  indentDepth,
int  indentDepthS 
)
private

Recursively writes the cluster structure in OGML.

void ogdf::ClusterGraphAttributes::writeGML ( const char *  fileName)

Writes attributed clustergraph in GML format to file fileName.

void ogdf::ClusterGraphAttributes::writeGML ( ostream &  os)

Writes attributed clustergraph in GML format to output stream os.

void ogdf::ClusterGraphAttributes::writeGraphWinCluster ( ostream &  os,
NodeArray< int > &  nId,
int &  nextId,
cluster  c,
String  indent 
)
private

Recursively writes the cluster structure in GraphWin GML format.

void ogdf::ClusterGraphAttributes::writeOGML ( const char *  fileName)

Writes attributed clustergraph in OGML format to file fileName.

void ogdf::ClusterGraphAttributes::writeOGML ( ostream &  os)

Writes attributed clustergraph in OGML format to output stream os.


Member Data Documentation

HashArray<int, ClusterInfo> ogdf::ClusterGraphAttributes::m_clusterInfo
private

Information on the cluster positions, index is cluster ID.

Definition at line 386 of file ClusterGraphAttributes.h.

ClusterArray<String> ogdf::ClusterGraphAttributes::m_clusterTemplate
private

Name of cluster template.

Definition at line 109 of file ClusterGraphAttributes.h.

const ClusterGraph* ogdf::ClusterGraphAttributes::m_pClusterGraph
protected

Only points to existing graphs.

Definition at line 382 of file ClusterGraphAttributes.h.


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