Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Stores a directed dependency graph and provides deterministic dependency queries.

API: engine
Inherits: object
Project: Inno.Core.Collections

public sealed class Inno.Core.Collections.DependencyGraph<TKey> where TKey : notnull

Type parameter TKey: The node key type.

An edge from node to dependency means that node depends on dependency. The graph accepts cycles; operations that require an acyclic graph, such as M:Inno.Core.Collections.DependencyGraph`1.TopologicalSort, report them explicitly.

Kind Element Description
Constructors DependencyGraph<TKey>.Constructor Creates an empty dependency graph.
Methods DependencyGraph<TKey>.AddDependency Adds an edge indicating that one node depends on another.
Methods DependencyGraph<TKey>.AddNode Adds a node when it does not already exist.
Methods DependencyGraph<TKey>.Clear Removes every node and edge.
Methods DependencyGraph<TKey>.ContainsNode Determines whether a node exists.
Methods DependencyGraph<TKey>.DependsOn Determines whether one node directly or transitively depends on another.
Methods DependencyGraph<TKey>.GetDependencies Gets direct or transitive dependencies of a node.
Methods DependencyGraph<TKey>.GetDependents Gets direct or transitive dependents of a node.
Methods DependencyGraph<TKey>.GetStronglyConnectedComponents Gets every strongly connected component in deterministic order.
Methods DependencyGraph<TKey>.RemoveDependency Removes a dependency edge.
Methods DependencyGraph<TKey>.RemoveNode Removes a node and every incoming and outgoing edge connected to it.
Methods DependencyGraph<TKey>.ReplaceDependencies Atomically replaces every direct dependency of a node.
Methods DependencyGraph<TKey>.TopologicalSort Returns an order in which every dependency precedes its dependents.
Methods DependencyGraph<TKey>.TryFindCycle Tries to find one complete cycle in the graph.
Properties DependencyGraph<TKey>.count Gets the number of nodes in the graph.
Properties DependencyGraph<TKey>.version Gets the structural version of the graph.