36#ifndef __YTLIB_PC_GRAPH_H
37#define __YTLIB_PC_GRAPH_H
41#include "util/ytIntArray.h"
55void ytPCGraph_setOrder(
ytPCGraph *
this,
int nodes);
79void ytPCGraph_print(
const ytPCGraph *
this, FILE * fp);
80int ytPCGraph_test(
int argc,
char * argv[]);
Interface class for handling graph structure.
Definition: ytPCGraph.h:43
int ytPCGraph_numChildren(const ytPCGraph *this, int j)
Returns the number of children of the specified node.
Definition: ytPCGraph.c:249
void ytPCGraph_addEdge(ytPCGraph *this, int src, int dst)
Adds an edge to the graph.
Definition: ytPCGraph.c:352
const int * ytPCGraph_getChildren(const ytPCGraph *this, int j)
Returns the pointer to the children.
Definition: ytPCGraph.c:331
void ytPCGraph_clear(ytPCGraph *this)
Removes all the edges.
Definition: ytPCGraph.c:187
int ytPCGraph_getChild(const ytPCGraph *this, int j, int k)
Returns the child index of the node.
Definition: ytPCGraph.c:304
int ytPCGraph_getParent(const ytPCGraph *this, int j, int k)
Returns the parent index of the node.
Definition: ytPCGraph.c:294
int ytPCGraph_numNodes(const ytPCGraph *this)
Returns the number of nodes in the graph.
Definition: ytPCGraph.c:198
void ytPCGraph_addGraph(ytPCGraph *this, const ytGraph *src)
Adds edges in the given graph into this graph.
Definition: ytPCGraph.c:471
int ytPCGraph_degree(const ytPCGraph *this, int j)
Returns the number of edges connected to the node.
Definition: ytPCGraph.c:278
void ytPCGraph_removeEdge(ytPCGraph *this, int src, int dst)
Removes the edge.
Definition: ytPCGraph.c:367
ytObject * ytPCGraph_obj(ytPCGraph *this)
Returns the pointer to the ytObject of this instance.
Definition: ytPCGraph.c:131
const int * ytPCGraph_getParents(const ytPCGraph *this, int j)
Returns the pointer to the parents.
Definition: ytPCGraph.c:317
void ytPCGraph_copy(ytPCGraph *this, const ytPCGraph *src)
Copies edges to this graph.
Definition: ytPCGraph.c:417
int ytPCGraph_numEdges(const ytPCGraph *this)
Returns the number of edges in the graph.
Definition: ytPCGraph.c:261
int ytPCGraph_checkEdge(const ytPCGraph *this, int src, int dst)
Checks if the specified edge exists in the graph.
Definition: ytPCGraph.c:215
int ytPCGraph_numParents(const ytPCGraph *this, int j)
Returns the number of parents of the specified node.
Definition: ytPCGraph.c:235
ytPCGraph * ytPCGraph_new(int nodes)
Generates the new ytPCGraph instance.
Definition: ytPCGraph.c:93
ytPCGraph * ytPCGraph_from_Graph(ytGraph *this)
Returns the pointer to the ytPCGraph from ytGraph.
Definition: ytPCGraph.c:178
int ytPCGraph_removeLastEdge(ytPCGraph *this, int src, int dst)
Removes the last edge.
Definition: ytPCGraph.c:393
ytGraph * ytPCGraph_Graph(ytPCGraph *this)
Definition: ytPCGraph.c:172
void ytPCGraph_copyGraph(ytPCGraph *this, const ytGraph *src)
Copies edges to this graph.
Definition: ytPCGraph.c:440
void ytPCGraph_delete(ytPCGraph *this)
Deletes the ytPCGraph instance.
Definition: ytPCGraph.c:156