Top level include containg common headers.
t_gen(* f_wedge)(t_gen, t_gen, t_gen, int)
struct dag_info t_daginfo
Longest Path and Node order after DAG ordering.
struct graph t_graph
graph struct defn
t_gen dijkstra(t_gen d, t_gen data)
Utils function used by quick sort for swapping graph edges
t_gen kruskals_mst(t_gen d)
Find the Minimum Spanning for weighted undirected graph Using Kruskal's Algorithm
struct bfs_info t_bfsinfo
Level and Parent info after BFS walk.
struct dist_info t_distinfo
Dist info.
t_gen create_graph(char *name, int size, t_dparams *prm)
graph interface APIs
struct dfs_info t_dfsinfo
Level and Parent info after DFS walk.
t_gen prims_mst(t_gen d)
Find the Minimum Spanning for weighted undirected graph Using Prim's Algorithm
struct gedge t_gedge
graph neighbor edges represented in neigh list
t_gen bellman_ford(t_gen d, t_gen data)
Find the shortest path from a given source vertex to all source nodes in a graph with negative edges ...
struct gnode t_gnode
graph Vertex
Contains declations of link list types, node and link list structure.
Level and Parent info after BFS walk.
t_gen parent
Pointer to Parent Vertex.
int comp
Subgraph id of vertex.
int level
Level of vertex from the source.
Longest Path and Node order after DAG ordering.
int indegree
Used internally for topologicaly order and find longest path in DAG.
int longest_path
Longest path to vertex in DAG.
t_gen node
Pointer to Vertex in topologically sorted order.
Level and Parent info after DFS walk.
t_gen parent
Pointer to Parent Vertex.
int post
Post Interval of a vertex on dfs walk.
int comp
Subgraph id of vertex.
int visited_neighbors
Used internally Flag indicating neighbors still to be visited.
int pre
Pre Interval of a vertex on dfs walk.
t_gnode * parent
Pointer to Vertex vertex.
t_gedge edge
Pointer to edge.
graph neighbor edges represented in neigh list
int weight
Cost of the edge.
t_gnode * node
Pointer to neighbor vertex.
t_linklist * neigh
Link List to neighbor vertices(nodes)
t_gen id
Pointer to store Data.
int idx
Index of vertex in adaceny list.
f_find find
routine to find a vertex in graph
f_len len
routine to get vertex count in graph
f_print wprint
routine to print graph info with edge weights
f_gen3 del_edge_sym
routine to del a symmetric edge in graph
f_print print
routine to print graph info
f_gen conn_comp
routine to get the connected components in graph
t_gnode * nodes
Adaceny List Representation of graph vertices.
f_wedge add_wedge_sym
routine to add a weighted symmetric edge in graph
char * name
Graph Instance Name.
f_destroy destroy
routine to destroy the graph instance
f_gen3 add_edge_sym
routine to add a symmetric edge in graph
f_gen3 del_edge
routine to del an edge in graph
f_gen3 has_edge
routine to check an edge between two vertices graph
f_gen3 add_edge
routine to add an edge in graph
int max_size
Max Vertex count of graph.
f_wedge add_wedge
routine to add a weighted edge in graph
f_gen2 bfs
routine to Breadth First Search in graph
f_gen2 del_vertex
routine to del a vertex in graph
int count
Vertex Count of graph.
f_gen2 dfs
routine to Depth First Search in graph
f_gen topo_order_dag
routine to topologica order a DAG
f_gen2 add_vertex
routine to add a vertex in graph
int total_edges
Edge count of graph.
Link List main structure.
f_gen2 f_find
fn type of find a elem function
void(* f_free)(t_gen, char *, int)
f_vgen f_print
fn type to print function
f_vgen f_destroy
fn type of destroy function
e_cmpr(* f_cmpr)(t_gen, t_gen)
Basic operations required for generic data type support.
t_gen(* f_gen2)(t_gen, t_gen)
fn ptr that takes two gen ptr and return gen ptr
int(* f_len)(t_gen)
fn type of get len function
void * t_gen
Base Data type used for all data structure and data elements.
t_gen(* f_gen)(t_gen)
Generic data pointer definitions that are common to most data structure operations.
t_gen(* f_gen3)(t_gen, t_gen, t_gen)
fn ptr that takes three gen ptr and return gen ptr