MantisBT
[ class tree: MantisBT ] [ index: MantisBT ] [ all elements ]

Class: Graph

Source Location: /core/graphviz_api.php

Class Overview


Base class for graph creation and manipulation. By default, undirected graphs are generated. For directed graphs, use Digraph class.


Variables

Methods


Child classes:

Digraph
Directed graph creation and manipulation.

Class Details

[line 69]
Base class for graph creation and manipulation. By default, undirected graphs are generated. For directed graphs, use Digraph class.



[ Top ]


Class Variables

$attributes = array()

[line 71]


Type:   mixed


[ Top ]

$default_edge =  null

[line 73]


Type:   mixed


[ Top ]

$default_node =  null

[line 72]


Type:   mixed


[ Top ]

$edges = array()

[line 75]


Type:   mixed


[ Top ]

$formats = array(
      'dot' => array(
         'binary' => false,
         'type' => GRAPHVIZ_ATTRIBUTED_DOT,
         'mime' => 'text/x-graphviz',
      ),'ps'=>array('binary'=>false,'type'=>GRAPHVIZ_PS,'mime'=>'application/postscript',),'hpgl'=>array('binary'=>true,'type'=>GRAPHVIZ_HPGL,'mime'=>'application/vnd.hp-HPGL',),'pcl'=>array('binary'=>true,'type'=>GRAPHVIZ_PCL,'mime'=>'application/vnd.hp-PCL',),'mif'=>array('binary'=>true,'type'=>GRAPHVIZ_MIF,'mime'=>'application/vnd.mif',),'gif'=>array('binary'=>true,'type'=>GRAPHVIZ_GIF,'mime'=>'image/gif',),'jpg'=>array('binary'=>false,'type'=>GRAPHVIZ_JPEG,'mime'=>'image/jpeg',),'jpeg'=>array('binary'=>true,'type'=>GRAPHVIZ_JPEG,'mime'=>'image/jpeg',),'png'=>array('binary'=>true,'type'=>GRAPHVIZ_PNG,'mime'=>'image/png',),'wbmp'=>array('binary'=>true,'type'=>GRAPHVIZ_WBMP,'mime'=>'image/vnd.wap.wbmp',),'xbm'=>array('binary'=>false,'type'=>GRAPHVIZ_XBM,'mime'=>'image/x-xbitmap',),'ismap'=>array('binary'=>false,'type'=>GRAPHVIZ_ISMAP,'mime'=>'text/plain',),'imap'=>array('binary'=>false,'type'=>GRAPHVIZ_IMAP,'mime'=>'application/x-httpd-imap',),'cmap'=>array('binary'=>false,'type'=>GRAPHVIZ_CMAP,'mime'=>'text/html',),'cmapx'=>array('binary'=>false,'type'=>GRAPHVIZ_CMAPX,'mime'=>'application/xhtml+xml',),'vrml'=>array('binary'=>true,'type'=>GRAPHVIZ_VRML,'mime'=>'x-world/x-vrml',),'svg'=>array('binary'=>false,'type'=>GRAPHVIZ_SVG,'mime'=>'image/svg+xml',),'svgz'=>array('binary'=>true,'type'=>GRAPHVIZ_SVGZ,'mime'=>'image/svg+xml',),'pdf'=>array('binary'=>true,'type'=>GRAPHVIZ_PDF,'mime'=>'application/pdf',),)

[line 80]


Type:   mixed


[ Top ]

$graphviz_com_module =

[line 78]


Type:   mixed


[ Top ]

$graphviz_tool =

[line 77]


Type:   mixed


[ Top ]

$name =  'G'

[line 70]


Type:   mixed


[ Top ]

$nodes = array()

[line 74]


Type:   mixed


[ Top ]



Class Methods


constructor Graph [line 186]

null Graph( [string $p_name = 'G'], [array $p_attributes = array()], [string $p_tool = 'neato'], [string $p_com_module = 'WinGraphviz.NEATO'])

Constructor for Graph objects.



Parameters:

string   $p_name  
array   $p_attributes  
string   $p_tool  
string   $p_com_module  

[ Top ]

method add_edge [line 249]

null add_edge( string $p_src, string $p_dst, [array $p_attributes = array()])

Adds an edge to the graph.



Parameters:

string   $p_src  
string   $p_dst  
array   $p_attributes  

[ Top ]

method add_node [line 236]

null add_node( string $p_name, [array $p_attributes = array()])

Adds a node to the graph.



Parameters:

string   $p_name  
array   $p_attributes  

[ Top ]

method generate [line 278]

null generate( )

Generates an undirected graph representation (suitable for neato).



Overridden in child classes as:

Digraph::generate()
Generates a directed graph representation (suitable for dot).

[ Top ]

method is_edge_present [line 265]

bool is_edge_present( string $p_src, string $p_dst)

Check if an edge is already present.



Parameters:

string   $p_src  
string   $p_dst  

[ Top ]

method output [line 306]

null output( [string $p_format = 'dot'], [bool $p_headers = false])

Outputs a graph image or map in the specified format.



Parameters:

string   $p_format  
bool   $p_headers  

[ Top ]

method set_attributes [line 202]

null set_attributes( array $p_attributes)

Sets graph attributes.



Parameters:

array   $p_attributes  

[ Top ]

method set_default_edge_attr [line 224]

null set_default_edge_attr( array $p_attributes)

Sets default attributes for all edges of the graph.



Parameters:

array   $p_attributes  

[ Top ]

method set_default_node_attr [line 213]

null set_default_node_attr( array $p_attributes)

Sets default attributes for all nodes of the graph.



Parameters:

array   $p_attributes  

[ Top ]

method _build_attribute_list [line 433]

string _build_attribute_list( array $p_attributes)

PROTECTED function to build a node or edge attribute list.



Parameters:

array   $p_attributes  

[ Top ]

method _print_graph_defaults [line 464]

null _print_graph_defaults( )

PROTECTED function to print graph attributes and defaults.



[ Top ]


Documentation generated on Sun, 12 Dec 2010 23:50:31 +0900 by phpDocumentor 1.4.3
inserted by FC2 system