INGOR
Loading...
Searching...
No Matches
ytPGraph.h
1/*
2 math/ytPGraph.{h,c} : Parent list 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_PGRAPH_H
10#define __YTLIB_PGRAPH_H
11
12#include <stdlib.h>
13#include "ytGraph.h"
14#include "util/ytIntArray.h"
15
16typedef struct {
17#ifdef DOXY
18private:
19#endif /* DOXY */
20 ytGraph super;
21 int nodes;
22 ytIntArray * parents;
23} ytPGraph;
24
25ytPGraph * ytPGraph_new(int nodes);
26ytObject * ytPGraph_obj(ytPGraph * this);
27ytGraph * ytPGraph_Graph(ytPGraph * this);
28void ytPGraph_delete(ytPGraph * this);
29void ytPGraph_clear(ytPGraph * this);
30int ytPGraph_numNodes(const ytPGraph * this);
31int ytPGraph_numParents(const ytPGraph * this, int j);
32int ytPGraph_getParent(const ytPGraph * this, int j, int k);
33int ytPGraph_checkEdge(const ytPGraph * this, int src, int dst);
34void ytPGraph_addEdge(ytPGraph * this, int src, int dst);
35void ytPGraph_copy(ytPGraph * this, const ytPGraph * src);
36void ytPGraph_copyGraph(ytPGraph * this, const ytGraph * src);
37void ytPGraph_addGraph(ytPGraph * this, const ytGraph * src);
38
39#endif /* __YTLIB_PGRAPH_H */
Interface class for handling graph structure.
Expandable array.
The basis class.
Definition ytPGraph.h:16