Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

Graph::getEdgeNumber

Returns the number of edges.

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Graph::getEdgeNumber(G)

Description

Graph::getEdgeNumber(G) returns a number representing the number of edges in G.

Examples

Example 1

Let us create a graph and find out the number of edges:

G1 := Graph([1, a, 3, 4], [[1, a], [1, 3], [1, 4]]):
Graph::getEdgeNumber(G1)

We know that a complete graph consists of |Vertices|2 - |Vertices| edges:

G2 := Graph::createCompleteGraph(4):
Graph::getEdgeNumber(G2)

Parameters

G

A graph

Return Values

Number

Was this topic helpful?