compute_metrics
Calculates graph-theoretic properties of diagrams, such as chain length, branching factor, density, node and edge counts, and acyclic status, to assess structural complexity.
Instructions
Compute structural metrics on diagram.
Computes graph-theoretic properties useful for understanding complexity.
Args: diagram_id: ID of diagram metrics: List of metrics to compute. Options: - 'chain_length': Longest path in DAG - 'branching_factor': Average out-degree - 'density': Overall connectivity - 'num_nodes': Node count - 'num_edges': Edge count - 'is_dag': Whether diagram is acyclic
Returns: dict with computed metrics
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metrics | Yes | ||
| diagram_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||