Graph

From Esolang
Jump to navigation Jump to search

A graph is a net or web. It can have directed or undirected edges (also known as lines or links) that connect nodes. Its presentation by picture is usually arrows connecting dots. Other ways of expressing a graph are list of connecting nodes from each node and a table where a 1 signifies connection between nodes at the ends of vertical and horizontal rows, and 0 means no connection, so the representation has a bitmap. A graph with intermediary states between connection and no connection, decimal numbers between 0 and 1, grayscales, is a weighed graph.

Most languages have graphs in some form even if the developers did not think them at all. Some languages using graphs very directly and deliberately are Cvlemar and Eodermdrome.

A directed graph is one that has directed edges. Normally, duplicate edges between the same nodes in the same direction aren't allowed because it is a set rather than a multiset. If duplicate edges are allowed, it is called a multigraph (a directed multigraph if the edges are directed, otherwise it is a undirected multigraph).

A planar graph is a graph that can be drawn on a 2D plane without the lines crossing each other.

A RDF graph is a directed graph where:

  • There are many types of edges, where the type of the edge is specified as a URI.
  • Each node is either labeled or unlabeled, or a "literal node".
  • A labeled node is labeled by a URI, and there is only one node with each URI.
  • An unlabeled node has no label and can be defined only by how it is wired to the rest of the graph.
  • A literal node contains a pair consisting of a string of Unicode codepoints (ranging from U+0001 to U+10FFFF, except surrogates, U+FFFE, and U+FFFF) and a URI.
  • A literal node cannot have any edges leading out of it, and does not necessarily have other properties of a node either.

See Also

Category:Graph-based