networks
induce
induces a subgraph in a graph
Calling Sequence
Parameters
Description
Examples
induce(Eset, G)
induce(Vset, G)
Eset
-
set of edges from G
Vset
set of vertices from G
G
graph or network
Important:The networks package has been deprecated. Use the superseding command GraphTheory[InducedSubgraph]instead.
This routine creates a subgraph of G from either a set of vertices and their incident edges or a set of edges and their ends.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[induce](...).
withnetworks:
G≔complete5:
induce1,2,3,4,G
procxoptionGRAPH,2;ifx=_Edgesthenthisproc_Edges ≔ elifx=_EdgeIndexthenthisproc_EdgeIndex ≔ tablesymmetricelifx=_Headthenthisproc_Head ≔ tableelifx=_Tailthenthisproc_Tail ≔ tableelifx=_Eweightthenthisproc_Eweight ≔ tableelifx=_Endsthenthisproc_Ends ≔ tableelifx=_Verticesthenthisproc_Vertices ≔ elifx=_Vweightthenthisproc_Vweight ≔ tablesparseelifx=_Ancestorthenthisproc_Ancestor ≔ tableelifx=_Daughterthenthisproc_Daughter ≔ tableelifx=_Neighborsthenthisproc_Neighbors ≔ tableelifx=_Statusthenthisproc_Status ≔ 'SIMPLE'elifx=_Emaxnamethenthisproc_Emaxname ≔ 0elsereturn'procnameargs'end ifend proc
ends
1,2,1,3,1,4,2,3,2,4,3,4
H≔induceincident1,G,G:
endsH
1,2,1,3,1,4,1,5
See Also
GraphTheory
GraphTheory[InducedSubgraph]
networks(deprecated)[complement]
networks(deprecated)[edges]
networks(deprecated)[incident]
with
Download Help Document