INGOR
Loading...
Searching...
No Matches
ytNetwork.h
1/*
2 net/ytNetwork.{h,c} : Network
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_NETWORK_H
10#define __YTLIB_NETWORK_H
11
12#include "math/ytGraph.h"
13#include "util/ytArray.h"
14#include "net/ytNode.h"
15#include "net/ytEdge.h"
16
17typedef struct ytNetwork_t ytNetwork;
18
19ytNetwork * ytNetwork_new();
20void ytNetwork_delete(ytNetwork * this);
21void ytNetwork_dump(ytNetwork * this, FILE * fp);
22int ytNetwork_numNodes(const ytNetwork * this);
23int ytNetwork_numGraphNodes(const ytNetwork * this);
24void ytNetwork_setGraph(ytNetwork * this, ytGraph * g);
25ytGraph * ytNetwork_getGraph(const ytNetwork * this);
26void ytNetwork_addNode(ytNetwork * this, ytNode * node);
27ytNode * ytNetwork_getNode(const ytNetwork * this, int j);
28ytNode * ytNetwork_setNode(ytNetwork * this, int j, ytNode * node);
29int ytNetwork_degree(const ytNetwork * this, int j);
30int ytNetwork_numParents(const ytNetwork * this, int j);
31int ytNetwork_maxParents(const ytNetwork * this);
32int ytNetwork_numChildren(const ytNetwork * this, int j);
33int ytNetwork_numEdges(const ytNetwork * this);
34const int * ytNetwork_getParents(const ytNetwork * this, int j);
35ytNode * ytNetwork_getParent(const ytNetwork * this, int j, int k);
36int ytNetwork_getParentId(const ytNetwork * this, int j, int k);
37void ytNetwork_setProperty(ytNetwork * this, const char * key, ytObject * value);
38ytObject * ytNetwork_getProperty(const ytNetwork * this, const char * key);
39int ytNetwork_getPropertySize(const ytNetwork * this);
40const char * ytNetwork_getPropertyKey(const ytNetwork * this, int i);
41ytObject * ytNetwork_getPropertyAt(const ytNetwork * this, int i);
42int ytNetwork_findNode(const ytNetwork * this, const char * name);
43ytObject * ytNetwork_getNodeProperty(ytNetwork * this, int j, const char * key);
44void ytNetwork_setNodeProperty(ytNetwork * this, int j, const char * key, ytObject * value);
45void ytNetwork_setEdge(ytNetwork * this, ytEdge * edge);
46ytEdge * ytNetwork_getEdge(ytNetwork * this, int u, int v);
47ytEdge * ytNetwork_getEdgeConst(const ytNetwork * this, int u, int v);
48ytEdge * ytNetwork_removeEdge(ytNetwork * this, int u, int v);
49
50#include "util/ytMPI.h"
51void ytNetwork_MPI_Bcast(ytNetwork ** pNetwork, int root, MPI_Comm comm);
52
53int ytNetwork_test(int argc, char * argv[]);
54
55#endif /* __YTLIB_NETWORK_H */
Network edge.
Interface class for handling graph structure.
Network abstraction.
The basis class.
Definition ytNetwork.c:21
Network node.
Definition ytNode.h:15