My Project
Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
Graph Class Reference

Public Member Functions

 Graph ()
 
 Graph (GraphType type)
 
uint node_count () const
 
void insert_node (Node *node)
 
void insert_edge (Node *node1, Node *node2)
 
std::vector< Node * > & get_nodes ()
 
std::vector< Node * > & get_neighbours (const Node &node)
 
void reset ()
 
void print_ctc () const
 

Public Attributes

int time
 
std::stack< Node * > stack
 
std::vector< std::vector< Node * > > ctc
 
std::stack< std::pair< int, int > > edges_stack
 
std::vector< Node * > articulation_points
 
std::vector< std::pair< Node *, Node * > > critical_edges
 

Private Attributes

GraphType graph_type
 
std::vector< Node * > nodes
 
std::vector< std::vector< Node * > > edges
 

Friends

std::istream & operator>> (std::istream &in, Graph &node)
 
std::ostream & operator<< (std::ostream &out, Graph &node)
 

Constructor & Destructor Documentation

◆ Graph()

Graph::Graph ( )

Proiectarea Algoritmilor, 2013 Lab 7: Aplicatii DFS

Author
Radu Iacob radu..nosp@m.iaco.nosp@m.b23@g.nosp@m.mail.nosp@m..com

Member Function Documentation

◆ get_neighbours()

std::vector< Node * > & Graph::get_neighbours ( const Node node)

Intoarce un vector cu toti vecinii unui nod.

◆ get_nodes()

std::vector< Node * > & Graph::get_nodes ( )

Intoarce un vector cu toate nodurile din graf.

◆ insert_edge()

void Graph::insert_edge ( Node node1,
Node node2 
)

Construieste o muchie intre cele doua noduri primite ca argument.

◆ insert_node()

void Graph::insert_node ( Node node)

Adauga nodul primit ca argument in graf.

◆ node_count()

uint Graph::node_count ( ) const

Numarul de noduri din graf.

◆ reset()

void Graph::reset ( )

Removes all temporary information related to the state of the graph during traversals (for example it sets every node as being unvisited)

Friends And Related Function Documentation

◆ operator>>

std::istream& operator>> ( std::istream &  in,
Graph node 
)
friend

Convenience overload of the IO operators for pretty printing/reading a graph

Format intrare: – numar de noduri, numar de muchii N M – M linii de tipul (A, B) cu semnficatia – ca exista muchie intre nodurile A si B Node1 Node2 ...

Member Data Documentation

◆ edges

std::vector<std::vector<Node*> > Graph::edges
private

Lista de adiacenta

◆ edges_stack

std::stack<std::pair<int, int> > Graph::edges_stack

Part II: Structuri auxiliare pentru muchii & noduri critice.

◆ graph_type

GraphType Graph::graph_type
private

Tipul grafului: orientat/neorientat

◆ nodes

std::vector<Node*> Graph::nodes
private

Nodurile din graf

◆ stack

std::stack<Node*> Graph::stack

Part I: Structuri auxiliare pentru determinarea componentelor tare conexe


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