Package | com.yworks.yfiles.layout.router |
Class | public class BusRepresentations |
Inheritance | BusRepresentations YObject Object |
In a representation by means of hubs, each connected subgraph induced by hubs establishes a bus. All regular nodes (non-hubs) which are connected to hubs of the same component are end-nodes of the same bus. In other words, nodes which are reachable on paths consisting of only hubs belong to the same bus. Of course, a node can be an end-node of more than one bus.
Since a bus models a group of nodes in which every node is connected to every other node, it can be represented as a complete subgraph of these nodes. To distinguish buses in this representation, each edge must be associated with a unique ID which identifies the bus it is associated to. This is the representation expected by com.yworks.yfiles.layout.router.BusRouter .
See also
Method | Defined By | ||
---|---|---|---|
BusRepresentations(init:Boolean = true) | BusRepresentations | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | BusRepresentations | ||
hashCode():int | YObject | ||
replaceHubsBySubgraph(graph:LayoutGraph, hubMarker:DataProvider, descriptorAcceptor:DataAcceptor):EdgeList [static]
Changes the representation of buses from hubs to complete subgraphs. | BusRepresentations | ||
replaceHubsBySubgraph2(graph:LayoutGraph, hubEdgesLists:Vector.<Object>, hubMarker:DataProvider, fixedMarker:DataProvider, descriptorAcceptor:DataAcceptor):EdgeList [static]
Changes the representation of buses from hubs to complete subgraphs by creating new edges between regular nodes and removing the hubs. | BusRepresentations | ||
replaceSubgraphByHubs(graph:LayoutGraph, edgeCursor:EdgeCursor, descriptorProvider:DataProvider, busIDAcceptor:DataAcceptor):void [static]
Changes the representation of buses from complete subgraphs to hubs by replacing intersection points by hubs. | BusRepresentations | ||
[static]
Calculates for every bus represented by hubs a list of all of its edges. | BusRepresentations |
Constant | Defined By | ||
---|---|---|---|
SOURCE_ID_DPKEY : Object = y.layout.router.BusRepresentations.SOURCE_ID_DPKEY [static]
com.yworks.yfiles.base.DataProvider key used to transfer a user-defined object from each original edge to the respective newly created edge. | BusRepresentations | ||
TARGET_ID_DPKEY : Object = y.layout.router.BusRepresentations.TARGET_ID_DPKEY [static]
com.yworks.yfiles.base.DataProvider key used to transfer a user-defined object from each original edge to the respective newly created edge. | BusRepresentations |
BusRepresentations | () | Constructor |
public function BusRepresentations(init:Boolean = true)
init:Boolean (default = true )
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
replaceHubsBySubgraph | () | method |
public static function replaceHubsBySubgraph(graph:LayoutGraph, hubMarker:DataProvider, descriptorAcceptor:DataAcceptor):EdgeList
Changes the representation of buses from hubs to complete subgraphs.
This method calls replaceHubsBySubgraph(graph, calculateBusEdgeLists(graph, hubMarker), hubMarker, false, busDescriptors)
.
Parameters
graph:LayoutGraph | |
hubMarker:DataProvider | |
descriptorAcceptor:DataAcceptor |
EdgeList |
See also
replaceHubsBySubgraph2 | () | method |
public static function replaceHubsBySubgraph2(graph:LayoutGraph, hubEdgesLists:Vector.<Object>, hubMarker:DataProvider, fixedMarker:DataProvider, descriptorAcceptor:DataAcceptor):EdgeList
Changes the representation of buses from hubs to complete subgraphs by creating new edges between regular nodes and removing the hubs. This method respects multiple connections of nodes and creates appropriate com.yworks.yfiles.layout.router.BusDescriptor s consisting of the bus ID and source and target group IDs.
The path of each new edge follows the route defined by the component of the hubs. If the subgraph of hubs is not a tree, these paths are ambiguous. In this case, an arbitrary tree is computed from the hub's subgraph which defines all the paths.Parameters
graph:LayoutGraph — the graph of the bus
| |
hubEdgesLists:Vector.<Object> — an EdgeList for each bus
| |
hubMarker:DataProvider — a DataProvider that returns true if and only if a node is a hub
| |
fixedMarker:DataProvider — a DataProvider that returns true if and only if an edge is fixed
| |
descriptorAcceptor:DataAcceptor — a DataAcceptor to which the created bus descriptors are set
|
EdgeList — a list of the created edges
|
See also
replaceSubgraphByHubs | () | method |
public static function replaceSubgraphByHubs(graph:LayoutGraph, edgeCursor:EdgeCursor, descriptorProvider:DataProvider, busIDAcceptor:DataAcceptor):void
Changes the representation of buses from complete subgraphs to hubs by replacing intersection points by hubs. The edges must form an orthogonal, cycle-free bus, otherwise an Error is thrown.
Parameters
graph:LayoutGraph — the graph of the bus
| |
edgeCursor:EdgeCursor — an EdgeCursor of the regular edges
| |
descriptorProvider:DataProvider — a DataProvider that provides a com.yworks.yfiles.layout.router.BusDescriptor for each edge
| |
busIDAcceptor:DataAcceptor — an optional DataAcceptor . If specified, the bus ID for each new edge is set to this data acceptor
|
Error — if the path of an edge is not orthogonal or if some paths form a cycle
|
See also
toEdgeLists | () | method |
public static function toEdgeLists(graph:Graph, hubMarker:DataProvider):Vector.<Object>
Calculates for every bus represented by hubs a list of all of its edges. Note that this method cannot return isolated hubs and that each edge between two regular nodes establishes a separate bus.
Parameters
graph:Graph — the graph
| |
hubMarker:DataProvider — a DataProvider which returns true if and only if a node is a hub
|
Vector.<Object> — an array of EdgeList s. Each list contains all edges of a bus.
|
SOURCE_ID_DPKEY | Constant |
public static const SOURCE_ID_DPKEY:Object = y.layout.router.BusRepresentations.SOURCE_ID_DPKEY
com.yworks.yfiles.base.DataProvider key used to transfer a user-defined object from each original edge to the respective newly created edge. Algorithms which respect this key expect the associated data provider to be also an instance of com.yworks.yfiles.base.DataAcceptor to enable the storage of the data object for the new edge. Since there is no one-to-one mapping between original and new edges, the data provider of this key is responsible for the edges whose source end is a regular node.
See also
TARGET_ID_DPKEY | Constant |
public static const TARGET_ID_DPKEY:Object = y.layout.router.BusRepresentations.TARGET_ID_DPKEY
com.yworks.yfiles.base.DataProvider key used to transfer a user-defined object from each original edge to the respective newly created edge. Algorithms which respect this key expect the associated data provider to be also an instance of com.yworks.yfiles.base.DataAcceptor to enable the storage of the data object for the new edge. Since there is no one-to-one mapping between original and new edges, the data provider of this key is responsible for the edges whose target end is a regular node.
See also