9#ifndef __YTLIB_DL_GRAPH_H
10#define __YTLIB_DL_GRAPH_H
12#include "util/ytIntArray.h"
19#define ytDLGraph_NULL ((size_t) -1)
74void ytDLGraph_resize_buff(
ytDLGraph *
this,
size_t size);
75void ytDLGraph_delete(
void *
this);
79void ytDLGraph_status(
ytDLGraph *
this, FILE * fp);
82size_t ytDLGraph_numNodes(
const ytDLGraph *
this);
83size_t ytDLGraph_numEdges(
const ytDLGraph *
this);
85size_t ytDLGraph_add_edge(
ytDLGraph *
this,
int u,
int v);
86int ytDLGraph_check_edge(
ytDLGraph *
this,
int u,
int v);
87size_t ytDLGraph_check_edge_index(
ytDLGraph *
this,
int u,
int v);
88size_t ytDLGraph_check_edge_id(
ytDLGraph *
this,
int u,
int v);
89void ytDLGraph_remove_edge_id(
ytDLGraph *
this,
size_t id);
90void ytDLGraph_remove_edge(
ytDLGraph *
this,
int u,
int v);
95size_t ytDLGraph_first_parent_id(
ytDLGraph *
this,
int v);
96size_t ytDLGraph_first_child_id(
ytDLGraph *
this,
int v);
97size_t ytDLGraph_next_parent_id(
ytDLGraph *
this,
size_t id);
98size_t ytDLGraph_next_child_id(
ytDLGraph *
this,
size_t id);
99size_t ytDLGraph_parent_next(
ytDLGraph *
this,
size_t id,
int * pa);
100size_t ytDLGraph_child_next(
ytDLGraph *
this,
size_t id,
int * ch);
102int ytDLGraph_get_parent(
ytDLGraph *
this,
size_t id);
103int ytDLGraph_get_child(
ytDLGraph *
this,
size_t id);
104void ytDLGraph_get_edge(
ytDLGraph *
this,
size_t id,
int * u,
int * v);
105void ytDLGraph_get_edge_index(
const ytDLGraph *
this,
size_t index,
int * u,
int * v);
107size_t ytDLGraph_first_edge(
ytDLGraph *
this);
108size_t ytDLGraph_next_edge(
ytDLGraph *
this,
size_t id);
113int ytDLGraph_check_cyclic(
ytDLGraph *
this,
int u,
int v);
115size_t ytDLGraph_num_parents(
ytDLGraph *
this,
int v);
116size_t ytDLGraph_num_children(
ytDLGraph *
this,
int v);
117size_t ytDLGraph_degree(
ytDLGraph *
this,
int v);
119void ytDLGraph_DAG_fsc_th(
ytDLGraph * g, ytFloatArray * sc,
float th,
122void ytDLGraph_print_all_parents(
ytDLGraph *
this, FILE * fp);
123void ytDLGraph_print_parents(
ytDLGraph *
this,
int j, FILE * fp);
124void ytDLGraph_print_children(
ytDLGraph *
this,
int j, FILE * fp);
Interface class for handling graph structure.
Definition ytDLGraph.h:22
Graph structure for efficient parents and children handling.
Definition ytDLGraph.h:45