networks(deprecated)/components - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : networks(deprecated)/components

networks

  

components

  

find the connected components of a graph

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

components(G)

components(G, root=v)

Parameters

G

-

graph

v

-

vertex of G

Description

• 

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

• 

The components of the graph G are returned as a set of sets.  The number of sets indicates the number of components while the elements of the sets indicate the vertices belonging to each component.

• 

If a second argument of the form root=v is given, then only the single component containing the vertex v is constructed.

• 

A set of subgraphs corresponding to each component can be constructed by mapping induce() onto the set of components.

• 

This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[components](...).

Examples

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

withnetworks:

Grandom12,6:

endsG

2,3,2,10,2,12,3,8,4,6,6,8

(1)

componentsG

1,5,7,9,11,2,3,4,6,8,10,12

(2)

componentsG,root=5

5

(3)

See Also

GraphTheory

GraphTheory[ConnectedComponents]

networks(deprecated)[bicomponents]

networks(deprecated)[random]

with