36#ifndef __YTLIB_ADJ_GRAPH_H
37#define __YTLIB_ADJ_GRAPH_H
63void ytAdjGraph_print(
const ytAdjGraph *
this, FILE * fp);
Interface class for handling graph structure.
Graph by adjacent matrix.
Definition: ytAdjGraph.h:41
ytGraphEdgeIter * ytAdjGraph_edgeIter(const ytAdjGraph *this)
Generates the ytGraphEdgeIter instance.
Definition: ytAdjGraph.c:332
int ytAdjGraph_numParents(const ytAdjGraph *this, int j)
Returns the number of parents of the specified node.
Definition: ytAdjGraph.c:200
void ytAdjGraph_removeEdge(ytAdjGraph *this, int src, int dst)
Removes the edge.
Definition: ytAdjGraph.c:285
void ytAdjGraph_delete(ytAdjGraph *this)
Deletes the ytAdjGraph instance.
Definition: ytAdjGraph.c:115
int ytAdjGraph_numNodes(const ytAdjGraph *this)
Returnts the number of nodes.
Definition: ytAdjGraph.c:129
int ytAdjGraph_degree(const ytAdjGraph *this, int j)
Returns the number of edges connected to the node.
Definition: ytAdjGraph.c:181
int ytAdjGraph_checkEdge(const ytAdjGraph *this, int src, int dst)
Checks if the specified edge exists in the graph.
Definition: ytAdjGraph.c:167
ytAdjGraph * ytAdjGraph_new(int nodes)
Generates the new ytAdjGraph instance.
Definition: ytAdjGraph.c:67
int ytAdjGraph_numEdges(const ytAdjGraph *this)
Returns the number of edges.
Definition: ytAdjGraph.c:142
void ytAdjGraph_addEdge(ytAdjGraph *this, int src, int dst)
Adds an edge to the graph.
Definition: ytAdjGraph.c:248
int ytAdjGraph_numChildren(const ytAdjGraph *this, int j)
Returns the number of children of the specified node.
Definition: ytAdjGraph.c:223
const int * ytAdjGraph_getParents(const ytAdjGraph *this, int j)
Returns the pointer to the parents.
Definition: ytAdjGraph.c:264