isLinked

network.isLinked(source, target)
Returns True iff there is an edge in the network which connects node source to node target.
source: integer
The node number of the source node.
target: integer
The node number of the target node.

Example (python-conedy)

import conedy as co


N = co.network()

source = N.addNode(co.node())
target = N.addNode(co.node())
N.addEdge (source, target, co.weightedEdge(1.0))

print "Should be True: " + str(N.isLinked (source,target))
print "Should be Talse: " + str(N.isLinked (target,source))

Example (conedy)

network N;


int source;
int target;

source = N.addNode(node());
target = N.addNode(node());

N.addEdge(source, target, weightedEdge(1.0));

print "Should be 1: " + (N.isLinked (source,target)) + newline;
print "Should be 0: " +( N.isLinked (target,source)) + newline;

Table Of Contents

Previous topic

isDirected

Next topic

lattice