INGOR
Loading...
Searching...
No Matches
math
ytAdjGraph.h
1
/*
2
math/ytAdjGraph.{h,c} : Adjacent Matrix Graph
3
Copyright (C) 2018, Yoshinori Tamada <tamada A T ytlab.jp>
4
All rights reserved.
5
6
See LICENSE.txt for details of the licensing agreement.
7
*/
8
9
#ifndef __YTLIB_ADJ_GRAPH_H
10
#define __YTLIB_ADJ_GRAPH_H
11
12
#include "ytGraph.h"
13
14
typedef
struct
{
15
#ifdef DOXY
16
private
:
17
#endif
18
ytGraph
super;
19
int
nodes;
20
char
* matrix;
/* (u,v) edge is stored in matrix[u + v * nodes]. */
21
int
* work;
/* for returning a parent list. */
22
}
ytAdjGraph
;
23
24
ytAdjGraph
* ytAdjGraph_new(
int
nodes);
25
void
ytAdjGraph_delete(
ytAdjGraph
*
this
);
26
int
ytAdjGraph_numNodes(
const
ytAdjGraph
*
this
);
27
int
ytAdjGraph_numEdges(
const
ytAdjGraph
*
this
);
28
int
ytAdjGraph_checkEdge(
const
ytAdjGraph
*
this
,
int
src,
int
dst);
29
int
ytAdjGraph_degree(
const
ytAdjGraph
*
this
,
int
j);
30
int
ytAdjGraph_numParents(
const
ytAdjGraph
*
this
,
int
j);
31
int
ytAdjGraph_numChildren(
const
ytAdjGraph
*
this
,
int
j);
32
void
ytAdjGraph_addEdge(
ytAdjGraph
*
this
,
int
src,
int
dst);
33
const
int
* ytAdjGraph_getParents(
const
ytAdjGraph
*
this
,
int
j);
34
void
ytAdjGraph_removeEdge(
ytAdjGraph
*
this
,
int
src,
int
dst);
35
void
ytAdjGraph_clear(
ytAdjGraph
*
this
);
36
void
ytAdjGraph_print(
const
ytAdjGraph
*
this
, FILE * fp);
37
ytGraphEdgeIter
* ytAdjGraph_edgeIter(
const
ytAdjGraph
*
this
);
38
void
ytAdjGraph_edgeIterNext(
const
ytAdjGraph
*
this
,
ytGraphEdgeIter
* iter);
39
40
#ifdef USE_MPI
41
void
ytAdjGraph_MPI_BcastI(
ytObject
** pg,
int
root, MPI_Comm comm);
42
#endif
43
44
#endif
/* __YTLIB_ADJ_GRAPH_H */
ytGraph
Interface class for handling graph structure.
ytObject
The basis class.
ytAdjGraph
Graph by adjacent matrix.
Definition
ytAdjGraph.h:14
ytGraphEdgeIter
Definition
ytGraph.h:26
Generated by
1.9.8