36#ifndef __YTLIB_NETWORK_H
37#define __YTLIB_NETWORK_H
39#include "math/ytGraph.h"
40#include "util/ytArray.h"
41#include "net/ytNode.h"
42#include "net/ytEdge.h"
48void ytNetwork_dump(
ytNetwork *
this, FILE * fp);
61const int * ytNetwork_getParents(
const ytNetwork *
this,
int j);
66int ytNetwork_getPropertySize(
const ytNetwork *
this);
67const char * ytNetwork_getPropertyKey(
const ytNetwork *
this,
int i);
71void ytNetwork_setNodeProperty(
ytNetwork *
this,
int j,
const char * key,
ytObject * value);
77#include "util/ytMPI.h"
80int ytNetwork_test(
int argc,
char * argv[]);
Interface class for handling graph structure.
ytNetwork * ytNetwork_new()
Generates a ytNetwork instance.
Definition: ytNetwork.c:83
ytNode * ytNetwork_getParent(const ytNetwork *this, int j, int k)
Returns the parent of the specified node.
Definition: ytNetwork.c:247
ytObject * ytNetwork_getProperty(const ytNetwork *this, const char *key)
Returns the property value associated with the specified key.
Definition: ytNetwork.c:277
void ytNetwork_setEdge(ytNetwork *this, ytEdge *edge)
Sets the ytEdge instance.
Definition: ytNetwork.c:339
int ytNetwork_numParents(const ytNetwork *this, int j)
Returns the number of parents.
Definition: ytNetwork.c:207
ytNode * ytNetwork_getNode(const ytNetwork *this, int j)
Returns the ytNode instance at the specified index.
Definition: ytNetwork.c:158
void ytNetwork_MPI_Bcast(ytNetwork **pNetwork, int root, MPI_Comm comm)
[MPI] Broadcasts the ytNetwork instance with MPI.
Definition: ytNetwork.c:559
int ytNetwork_numChildren(const ytNetwork *this, int j)
Return the number of children.
Definition: ytNetwork.c:227
ytEdge * ytNetwork_removeEdge(ytNetwork *this, int u, int v)
Removes an edge.
Definition: ytNetwork.c:441
void ytNetwork_setGraph(ytNetwork *this, ytGraph *g)
Sets the ytGraph instance as the structure.
Definition: ytNetwork.c:134
ytNode * ytNetwork_setNode(ytNetwork *this, int j, ytNode *node)
Replaces the ytNode instance.
Definition: ytNetwork.c:169
ytEdge * ytNetwork_getEdgeConst(const ytNetwork *this, int u, int v)
Returns the ytEdge instance.
Definition: ytNetwork.c:410
int ytNetwork_numGraphNodes(const ytNetwork *this)
Returns the number of nodes in the ytGraph instance set to this network.
Definition: ytNetwork.c:187
ytGraph * ytNetwork_getGraph(const ytNetwork *this)
Returns the ytGraph instance set as the structure.
Definition: ytNetwork.c:140
int ytNetwork_numNodes(const ytNetwork *this)
Returns the added ytNode instances.
Definition: ytNetwork.c:180
void ytNetwork_setProperty(ytNetwork *this, const char *key, ytObject *value)
Sets a property value with its key.
Definition: ytNetwork.c:268
int ytNetwork_maxParents(const ytNetwork *this)
Returns the maximum number of parents.
Definition: ytNetwork.c:216
int ytNetwork_numEdges(const ytNetwork *this)
Returns the number of edges.
Definition: ytNetwork.c:235
ytEdge * ytNetwork_getEdge(ytNetwork *this, int u, int v)
Returns the ytEdge instance.
Definition: ytNetwork.c:374
int ytNetwork_degree(const ytNetwork *this, int j)
Returns the degree of the specified node.
Definition: ytNetwork.c:197
void ytNetwork_addNode(ytNetwork *this, ytNode *node)
Adds the ytNode instance.
Definition: ytNetwork.c:150
int ytNetwork_getParentId(const ytNetwork *this, int j, int k)
Returns the index of the parent of the node.
Definition: ytNetwork.c:255
int ytNetwork_findNode(const ytNetwork *this, const char *name)
Returns the index of the node which has the specified name.
Definition: ytNetwork.c:304
void ytNetwork_delete(ytNetwork *this)
Deletes the ytNetwork instance.
Definition: ytNetwork.c:96
Definition: ytNetwork.c:48
Network node.
Definition: ytNode.h:42