class gxl_graph

Graph, conform to GXL, uses Edge and Node

Inheritance:


Public Fields

[more]map<string,int> edge_idx
map from edge string-id to its index
[more]map<string,int> node_idx
map from node string-id to its index
[more]map<string,int> rel_idx
map from rel string-id to its index
[more]map<int,set<int> > from_to_map
adjacent list, state_id -> edge_1_id, edge_2_id, edge_3_id,
[more]map<int,set<int> > to_from_map
inverse adjacent list, state_id -> edge_1_id, edge_2_id, edge_3_id,

Public Methods

[more] gxl_graph ()
[more] gxl_graph (const string& id)
[more] gxl_graph (const string& tag, XMLIO_Attributes &attributes)
[more]virtual XMLIO_Element* XMLIO_startTag (const string& tag, XMLIO_Attributes &attributes)
expected elements are: gxl_graph, Initial, Emissions and Sequences
[more]virtual void XMLIO_endTag (const string& tag)
[more]virtual void XMLIO_getCharacters (const string& characters)
[more]virtual void XMLIO_finishedReading ()
[more]virtual const char* toString () const
Returns name of class.
[more]virtual void print () const
dumps all content to cout
[more]virtual int get_node_idx (const string& node_id) const
[more]virtual int exists_node (const string& node_id) const
[more]virtual int replace_node (gxl_node* node)
replace the node with the same id by this one.
[more]virtual int update_node (gxl_node* node)
replace or add the node identified by id
[more]virtual int add_node (gxl_node* node)
[more]virtual int remove_node (const string& node_id)
[more]virtual void reorganize_graph ()
regenerates the maps and (inverse) adjacent lists
[more]virtual int get_edge_idx (const string& edge_id) const
[more]virtual int exists_edge (const string& edge_id) const
[more]virtual int add_edge (gxl_edge* edge)
[more]virtual int remove_edge (const string& edge_id)
[more]virtual set<int> & get_to_from_transitions (int state_id)
[more]virtual set<int> & get_from_to_transitions (int state_id)
[more]virtual set<int> & get_to_from_transitions (const string& state_id)
[more]virtual set<int> & get_from_to_transitions (const string& state_id)
[more]virtual const XMLIO_Attributes& XMLIO_getAttributes () const
[more]virtual const int XMLIO_writeContent (XMLIO_Document& writer) const
[more]void dumpInternalState () const
dumps all internal lists and maps to cerr

Protected Methods

[more]void add_from_to (int edge_pos, int from_idx, int to_idx)
adds edge (given as edge vector index) to both adjacent lists
[more]void remove_from_to (int edge_pos, int from_idx, int to_idx)
removes edge (given as edge vector index) to both adjacent lists


Inherited from gxl_typedElement:

Public Fields

ovector<gxl_attr*> my_attrs
ogxl_type* my_type
ostring id

Private Methods

ovoid init_members()


Inherited from XMLIO_Element:

Public Fields

oXMLIO_string tag
oXMLIO_Attributes attributes
oXMLIO_IndentationType xmlio_indent_type

Public Methods

ovirtual void XMLIO_getComment(const XMLIO_string& comment)
ovirtual void XMLIO_getProcessingInstruction(const XMLIO_string& target, const XMLIO_string& instructions)
ovirtual bool XMLIO_remove() const
ovirtual const XMLIO_string& XMLIO_getName() const
ovirtual bool XMLIO_isEmpty() const


Documentation

Graph, conform to GXL, uses Edge and Node
o gxl_graph()

o gxl_graph(const string& id)

o gxl_graph(const string& tag, XMLIO_Attributes &attributes)

ovirtual XMLIO_Element* XMLIO_startTag(const string& tag, XMLIO_Attributes &attributes)
expected elements are: gxl_graph, Initial, Emissions and Sequences

ovirtual void XMLIO_endTag(const string& tag)

ovirtual void XMLIO_getCharacters(const string& characters)

ovirtual void XMLIO_finishedReading()

ovirtual const char* toString() const
Returns name of class.

ovirtual void print() const
dumps all content to cout

ovirtual int get_node_idx(const string& node_id) const
Returns:
-1 if node does not exist

ovirtual int exists_node(const string& node_id) const
Returns:
true if this id exists, false if it does not exist or is not valid

ovirtual int replace_node(gxl_node* node)
replace the node with the same id by this one. The old one is deleted.
Returns:
-1 if there is no node with the same id

ovirtual int update_node(gxl_node* node)
replace or add the node identified by id
Returns:
index of the node

ovirtual int add_node(gxl_node* node)
Returns:
-1 if there is allready a node of same id

ovirtual int remove_node(const string& node_id)
Returns:
returns the node of the deleted edge, -1 if there was no node to delete, or an edge refers to this node

ovirtual void reorganize_graph()
regenerates the maps and (inverse) adjacent lists

ovirtual int get_edge_idx(const string& edge_id) const
Returns:
-1 if edge does not exist

ovirtual int exists_edge(const string& edge_id) const
Returns:
true if this id exists, false if it does not exist or is not valid

ovirtual int add_edge(gxl_edge* edge)
Returns:
-1 if there is allready a node of same id

ovirtual int remove_edge(const string& edge_id)
Returns:
returns the index of the deleted edge, -1 if there was no edge to delete

ovirtual set<int> & get_to_from_transitions(int state_id)

ovirtual set<int> & get_from_to_transitions(int state_id)

ovirtual set<int> & get_to_from_transitions(const string& state_id)

ovirtual set<int> & get_from_to_transitions(const string& state_id)

ovirtual const XMLIO_Attributes& XMLIO_getAttributes() const

ovirtual const int XMLIO_writeContent(XMLIO_Document& writer) const

ovoid dumpInternalState() const
dumps all internal lists and maps to cerr

ovoid add_from_to(int edge_pos, int from_idx, int to_idx)
adds edge (given as edge vector index) to both adjacent lists

ovoid remove_from_to(int edge_pos, int from_idx, int to_idx)
removes edge (given as edge vector index) to both adjacent lists

omap<string,int> edge_idx
map from edge string-id to its index

omap<string,int> node_idx
map from node string-id to its index

omap<string,int> rel_idx
map from rel string-id to its index

omap<int,set<int> > from_to_map
adjacent list, state_id -> edge_1_id, edge_2_id, edge_3_id,

omap<int,set<int> > to_from_map
inverse adjacent list, state_id -> edge_1_id, edge_2_id, edge_3_id,


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.