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](...).
with⁡networks:
G≔complete⁡5:
induce⁡1,2,3,4,G
procxoptionGRAPH,2;ifx=_Edgesthenthisproc⁡_Edges ≔ elifx=_EdgeIndexthenthisproc⁡_EdgeIndex ≔ table⁡symmetricelifx=_Headthenthisproc⁡_Head ≔ table⁡elifx=_Tailthenthisproc⁡_Tail ≔ table⁡elifx=_Eweightthenthisproc⁡_Eweight ≔ table⁡elifx=_Endsthenthisproc⁡_Ends ≔ table⁡elifx=_Verticesthenthisproc⁡_Vertices ≔ elifx=_Vweightthenthisproc⁡_Vweight ≔ table⁡sparseelifx=_Ancestorthenthisproc⁡_Ancestor ≔ table⁡elifx=_Daughterthenthisproc⁡_Daughter ≔ table⁡elifx=_Neighborsthenthisproc⁡_Neighbors ≔ table⁡elifx=_Statusthenthisproc⁡_Status ≔ 'SIMPLE'elifx=_Emaxnamethenthisproc⁡_Emaxname ≔ 0elsereturn'procname⁡args'end ifend proc
ends⁡
1,2,1,3,1,4,2,3,2,4,3,4
H≔induce⁡incident⁡1,G,G:
ends⁡H
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