DependencyGraph
DependencyGraph[context]⟹graph
returns a graph representation of the symbol dependencies between all the symbols in context and any child contexts.
DependencyGraph[symbols]⟹graph
returns a graph representation of the symbol dependencies between all the symbols given in the symbols input list.
Details
- The intended use of this function is not visualization but rather Usage in other functions which do graph traversal/analysis.
- Be careful when trying to Visualize a DependencyGraph in the Mathematica front-end, the number of vertices/edges can get very large and crash the front-end.
- Child contexts include Private contexts. For instance, "Core`" includes "Core`Private`". If given a large enough context or list of symbols, this function may take several minutes to run.
- In order to calculate dependencies between definitions, only the right hand side of definitions are examined. Any functions used in definition pattern matches will not be included.
Input
Output
General Options
Examples
Basic Examples (3)
Options (3)
Applications (3)
Calculate the dependency graph of Options` and use it to find all functions with dependencies to single character symbols:
Calculate the dependency graph of Options` to find the dependencies of OptionDefinition:
Use the dependency graph of UnitTest` to calculate dependencies within the package of the symbol 'Test' within 2 levels:
Last modified on Mon 25 Sep 2023 15:10:07