Difference between revisions of "Graph (data structure)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
Line 3: Line 3:
 
== Description ==
 
== Description ==
  
A graph data structure consists of a finite (and possibly mutable) set of [[Node (mathematics)|nodes]] or vertices, together with a set of ordered pairs of these nodes (or, in some cases, a set of unordered pairs).
+
A graph data structure consists of a finite (and possibly mutable) set of nodes or vertices, together with a set of ordered pairs of these nodes (or, in some cases, a set of unordered pairs).
  
 
These pairs are known as edges or arcs.
 
These pairs are known as edges or arcs.
Line 24: Line 24:
 
* [[Mathematics]]
 
* [[Mathematics]]
 
* [[Node (mathematics)]]
 
* [[Node (mathematics)]]
 +
* [[Node (computer science)]]
  
 
== External links ==  
 
== External links ==  
  
 
* [https://en.wikipedia.org/wiki/Graph_(abstract_data_type) Graph (data structure)] @ Wikipedia
 
* [https://en.wikipedia.org/wiki/Graph_(abstract_data_type) Graph (data structure)] @ Wikipedia

Revision as of 08:55, 10 March 2016

In computer science, a graph is an abstract data type that is meant to implement the graph and directed graph concepts from mathematics.

Description

A graph data structure consists of a finite (and possibly mutable) set of nodes or vertices, together with a set of ordered pairs of these nodes (or, in some cases, a set of unordered pairs).

These pairs are known as edges or arcs.

As in mathematics, an edge (x,y) is said to point or go from x to y.

The nodes may be part of the graph structure, or may be external entities represented by integer indices or references.

Edge values

A graph data structure may also associate to each edge some edge value, such as a symbolic label or a numeric attribute (cost, capacity, length, etc.).

See also

External links