Options
All
  • Public
  • Public/Protected
  • All
Menu

Optimize the given graph, to reduce the number of edges so that it is more readable.

Algorithm:

[done] 1a. all nodes with same set of incoming edges -> place in an 'optimization' cluster, and replace those edges with 1 edge to the cluster 1b. edges with same origin, and destinations are all in same optimization cluster -> replace with 1 edge to that cluster [done] 1c. edges with same destination, and origins are all in same optimization cluster -> replace with 1 edge from that cluster (future) could detect nodes with mostly same incoming edges -> place in cluster, and replace some edges (alt option) nodes in same cluster as 'records' (just a rendering option?)

Hierarchy

  • GraphOptimizer

Index

Properties

Private containerId

containerId: number = 1

Methods

optimize

Private optimizeEdgesWithOriginsInSameCluster

  • optimizeEdgesWithOriginsInSameCluster(root: GraphCluster): void

Private optimizeNodesWithSameIncomings

Private optimizeNodesWithSameIncomingsForCluster

  • optimizeNodesWithSameIncomingsForCluster(parent: GraphCluster, nodeIds: string[], mapNodeIdToNode: Map<string, GraphNode>): void

Private populateMaps

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc