skip to main content
Programmer's documentation > Developing hypergraphs > Using hypergraphs > Introducing hypergraphs
 
Introducing hypergraphs
Hypergraphs typically occur in applications such as electrical signal diagrams, multiflow visualization, network management, and UML diagrams.
Hypergraphs are implemented with the class IlvHyperGrapher. Hypergraphs are based on graphers and extend them with the concept of hyperedges. Hyperedges are links that have multiple sources and multiple sinks.
A hypergraph is an instance of the class IlvHyperGrapher, a subclass of IlvGrapher (and of IlvManager). While a normal graph can only contain nodes and links, a hypergraph can contain three types of object:
*Nodes, as in an IlvGrapher.
*Links, as in an IlvGrapher, that connect a source node to a target node
*Hyperedges, which connect multiple nodes and cannot exist in an IlvGrapher.
The following diagram shows the associations between the classes relevant to hypergraphs.
Classes for hypergraphs
A normal link has exactly two end nodes: a source and a target. Sometimes the source node is called the origin and the target is called the destination. If the link is directional, an arrowhead is drawn at the target node to indicate the direction of the link. A normal graph has nodes and normal links.
A hyperedge is similar to a link, but can have multiple source nodes and multiple target nodes; that is, 0, 1, 2, 3, ... nodes. A hyperedge with 0 source nodes and 0 target nodes is feasible, even though it may not make sense in many applications. There is no restriction in JViews Diagrammer on how many source or target nodes may exist.
A hypergraph is a graph that can contain hyperedges.
Several nodes connected by one hyperedge
In JViews Diagrammer, graphs, nodes, links, hypergraphs, and hyperedges are implemented by the classes listed in the following table.
Classes for graphs and hypergraphs
Class Name
Description
The base class of every drawable object, that is, for nodes, links, graphs, hyperedges, and so on. These objects are referred to as graphic objects. Every graphic object other than a link or a hyperedge is always treated as a node.
A normal graph with normal nodes and links.
IlvLinkImage and its subclasses
A normal link.
A hypergraph that can contain nodes, links, and hyperedges. It is a subclass of IlvGrapher. Therefore, it can also contain normal links. An IlvHyperGrapher object is derived from IlvGrapher and from IlvManager, so it may sometimes be referred to as a grapher or a manager, depending on the context (functionality typical of IlvGrapher or IlvManager ). When the functionality under discussion is outside these contexts, the object is called a hypergraph.
A hyperedge. This class is a subclass of IlvGraphic and not of IlvLinkImage. Therefore, hyperedges are incompatible with normal links. Even so, the end nodes of hyperedges are normal nodes (instances of IlvGraphic ).
A special subclass of IlvHyperEdge. Therefore, this is also a hyperedge.
The following diagram shows an example of a hypergraph with many hyperedges used in an electrical signal diagram. The hyperedges are shown in red.
An electrical signal diagram with hyperedges

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.