In file code/C/network.H:

class GNetwork : public GObject

Definition of the network and related functions

Inheritance:


public members:

GNetwork()
~GNetwork()
GNetwork &operator=( GNetwork &input)
Duplicates the network, nodes, pipes, messages, and queues
void Reset()
Reset flows to zero, and clear the message queues
int IncreaseFlow(int node, int pipe)
Increase the flow on the specified pipe and node by 1
int DecreaseFlow(int node, int pipe)
Decrease the flow on the specified pipe and node by 1
int QueryInputFlow(int node, int pipe)
Returns the flow on the specified input pipe and node
int QueryOutputFlow(int node, int pipe)
Returns the flow on the specified output pipe and node
int QueryNumInPipes(int node)
Returns the number of input pipes on node
int QueryNumOutPipes(int node)
Returns the number of output pipes on node
int QueryCapacityIn(int node, int pipe)
Returns the capacity of the specified input pipe and node
int QueryCapacityOut(int node, int pipe)
Returns the capacity of the specified output pipe and node
int SendMessageOut(int node, int pipe, int msg_id, int msg)
Sends msg out along output pipe pipe with id msg_id for node
int SendMessageIn(int node, int pipe, int msg_id, int msg)
Sends msg out along input pipe pipe with id msg_id for node
int RecieveMessageOut(int node, int pipe, int msg_id, int &msg)
Recieves output message of msg_id type on pipe pipe at node
int RecieveMessageIn(int node, int pipe, int msg_id, int &msg)
Recieves input message of msg_id type on pipe pipe at node
int AddNode()
Adds a new node, returns the node number of the new node
int AddPipe(int start, int end, int capacity)
Adds a new pipe from start to end with capacity capacity
int AddPipe( GPipe *pipe)
Adds the already defined pipe to the correct nodes
int GetSource()
Returns the current source
int GetSink()
Returns the current sink
int SetSource(int node)
Sets the source
int SetSink(int node)
Sets the sink
int GetNumNodes()
Returns the number of nodes in the network
void Print()
Print out the current network
int CalcMaxFlow()
Calculate the maximum flow through the network

private members:

GArray < GNetNode > nodes
The nodes contained in the network
GArray < GPipe > pipes
All of the pipes that are used in this network
int source
The source of the flow
int sink
The destination for the flow
int max_flow
The cached value for the maximum possible flow on the network

Inherited from GObject:

public members:

friend ostream& operator<<(ostream& s, GObject &)

Documentation

This class encapsulates a complete network. A network is defined as a collection of nodes with a defined source and sink.

this class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling