GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/Neighborhood

GraphTheory

  

Neighborhood

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Neighborhood(G, v, s)

Parameters

G

-

graph

v

-

vertex

s

-

(optional) the type of neighborhood, either open or closed

Description

• 

Neighborhood('G','v') returns the list of neighbors of v in G. If G is directed the directions of arcs are ignored.  An optional third argument, either open or closed, specifies whether to include the vertex v.  The default is open, which does not include v.

Examples

withGraphTheory:

withSpecialGraphs:

Q3HypercubeGraph3

Q3Graph 1: an undirected unweighted graph with 8 vertices and 12 edge(s)

(1)

NeighborhoodQ3,000

001,010,100

(2)

NeighborhoodQ3,000,closed

000,001,010,100

(3)

See Also

AdjacencyMatrix

Degree

Neighbors