Close
Close window
NumberOfEdges - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

GraphTheory

NumberOfEdges

count number of edges in graph

NumberOfVertices

count number of vertices in graph

Calling Sequence

NumberOfEdges(G,opts)

NumberOfVertices(G)

Parameters

G

-

a graph

opts

-

one or more options as specified below

Options

selfloops=truefalse

Specifies whether self-loops should be included in the count of edges returned. The default value is true.

Description

The NumberOfEdges(G,opts) command returns the number of edges (or arcs) in G.

The NumberOfVertices(G) command returns the number of vertices in G.

Examples

>

withGraphTheory:

>

K4CompleteGraph4

K4Graph 1: an undirected graph with 4 vertices and 6 edges

(1)
>

NumberOfVerticesK4

4

(2)
>

NumberOfEdgesK4

6

(3)
>

HDigraphTrail1,2,3,1,4,3,Trail4,2,1,3:

>

NumberOfVerticesH

4

(4)
>

NumberOfEdgesH

8

(5)

Compatibility

The selfloops option was introduced in Maple 2020.

For more information on Maple 2020 changes, see Updates in Maple 2020 .


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /