36#ifndef __YTLIB_DL_GRAPH_H
37#define __YTLIB_DL_GRAPH_H
39#include "util/ytIntArray.h"
46#define ytDLGraph_NULL ((size_t) -1)
101void ytDLGraph_resize_buff(
ytDLGraph *
this,
size_t size);
102void ytDLGraph_delete(
void *
this);
106void ytDLGraph_status(
ytDLGraph *
this, FILE * fp);
109size_t ytDLGraph_numNodes(
const ytDLGraph *
this);
110size_t ytDLGraph_numEdges(
const ytDLGraph *
this);
112size_t ytDLGraph_add_edge(
ytDLGraph *
this,
int u,
int v);
113int ytDLGraph_check_edge(
ytDLGraph *
this,
int u,
int v);
114size_t ytDLGraph_check_edge_index(
ytDLGraph *
this,
int u,
int v);
115size_t ytDLGraph_check_edge_id(
ytDLGraph *
this,
int u,
int v);
116void ytDLGraph_remove_edge_id(
ytDLGraph *
this,
size_t id);
117void ytDLGraph_remove_edge(
ytDLGraph *
this,
int u,
int v);
122size_t ytDLGraph_first_parent_id(
ytDLGraph *
this,
int v);
123size_t ytDLGraph_first_child_id(
ytDLGraph *
this,
int v);
124size_t ytDLGraph_next_parent_id(
ytDLGraph *
this,
size_t id);
125size_t ytDLGraph_next_child_id(
ytDLGraph *
this,
size_t id);
126size_t ytDLGraph_parent_next(
ytDLGraph *
this,
size_t id,
int * pa);
127size_t ytDLGraph_child_next(
ytDLGraph *
this,
size_t id,
int * ch);
129int ytDLGraph_get_parent(
ytDLGraph *
this,
size_t id);
130int ytDLGraph_get_child(
ytDLGraph *
this,
size_t id);
131void ytDLGraph_get_edge(
ytDLGraph *
this,
size_t id,
int * u,
int * v);
132void ytDLGraph_get_edge_index(
const ytDLGraph *
this,
size_t index,
int * u,
int * v);
134size_t ytDLGraph_first_edge(
ytDLGraph *
this);
135size_t ytDLGraph_next_edge(
ytDLGraph *
this,
size_t id);
140int ytDLGraph_check_cyclic(
ytDLGraph *
this,
int u,
int v);
142size_t ytDLGraph_num_parents(
ytDLGraph *
this,
int v);
143size_t ytDLGraph_num_children(
ytDLGraph *
this,
int v);
144size_t ytDLGraph_degree(
ytDLGraph *
this,
int v);
146void ytDLGraph_DAG_fsc_th(
ytDLGraph * g, ytFloatArray * sc,
float th,
149void ytDLGraph_print_all_parents(
ytDLGraph *
this, FILE * fp);
150void ytDLGraph_print_parents(
ytDLGraph *
this,
int j, FILE * fp);
151void ytDLGraph_print_children(
ytDLGraph *
this,
int j, FILE * fp);
Interface class for handling graph structure.
Definition ytDLGraph.h:49
Graph structure for efficient parents and children handling.
Definition ytDLGraph.h:72