networks(deprecated)/incidence - Maple Help

networks

 incidence
 makes an incidence matrix from a graph

 Calling Sequence incidence(G)

Parameters

 G - graph or network

Description

 • Important:The networks package has been deprecated. Use the superseding command GraphTheory[IncidenceMatrix]instead.
 • This procedure returns the incidence matrix with rows representing vertices and edges representing columns.
 • If an edge is not incident to a vertex then the corresponding table entry is 0.  If a directed edge is leaving a vertex then the corresponding table entry is -1.  In all other cases,  the table entry is 1.
 • This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[incidence](...).

Examples

Important:The networks package has been deprecated. Use the superseding command GraphTheory[IncidenceMatrix]instead.

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $G≔\mathrm{cycle}\left(4\right):$
 > $\mathrm{addedge}\left(\left[1,3\right],G\right):$
 > $T≔\mathrm{incidence}\left(G\right)$
 ${T}{≔}\left[\begin{array}{ccccc}{1}& {0}& {0}& {1}& {-1}\\ {1}& {1}& {0}& {0}& {0}\\ {0}& {1}& {1}& {0}& {1}\\ {0}& {0}& {1}& {1}& {0}\end{array}\right]$ (1)
 > $T\left[1,2\right]$
 ${0}$ (2)