dependency_edge
Stable type · Graphs
Tier: stable · Kind: type · Topic: Graphs
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
DependencyEdge | DependencyEdge | DependencyEdge | DependencyEdge | DependencyEdge |
Julia
struct DependencyEdge
DependencyEdge(source::String, target::String, relationship::String, equation_index::Union{Nothing, Int64}, expression::Union{Nothing, ASTExpr})
DependencyEdge(source, target, relationship, equation_index, expression)
Edge representing dependency between variables.
TypeScript
interface DependencyEdge {
source: string;
target: string;
relationship: 'additive' | 'multiplicative' | 'rate' | 'stoichiometric';
equation_index: number;
expression: Expr;
}
Graph edge representing a dependency between variables.
The equation_index sentinel NON_EQUATION_INDEX (-1) marks a
dependency that does not originate from a positionally-numbered equation or
reaction — a coupling variable map, or the synthetic expr_result edges of a
BARE-EXPRESSION target. (An observed unknown’s definition IS one of the
model’s equations from 1.0.0, so its edges carry that equation’s index.)
Properties
source— Source variable nametarget— Target variable namerelationship— PROVENANCE category of the dependency — which structural site produced it, NOT a classification of the operators involved. SeeEDGE_PROVENANCEfor the mapping. These values are fixed labels and do NOT track the actual operator: an equation edge is always'additive'(even forw = u * v) and an observed-definition edge is always'multiplicative'(even forw = u + v), regardless of the+/*/etc. actually used. Do not read arithmetic meaning into them.equation_index— Position of the equation/reaction that created this dependency, orNON_EQUATION_INDEX(-1) when the dependency has no positional equation (coupling maps and bare-expression targets).expression— The expression that created this dependency
Python
class DependencyEdge
DependencyEdge(source: str, target: str, relationship: str, equation_index: int | None = None, expression: Expr | None = None)
A dependency between two variables.
relationship is a PROVENANCE label, not a claim about the arithmetic:
an equation edge is always additive even for w = u * v. The
vocabulary (additive / multiplicative / rate /
stoichiometric) is shared by every binding.
Rust
pub struct DependencyEdge {
pub source: String,
pub target: String,
pub relationship: DependencyRelationship,
pub equation_index: Option<i64>,
pub expression: Option<Expr>,
}
Edge representing dependencies between variables in an expression graph
Go
type DependencyEdge struct {
Source string `json:"source"`
Target string `json:"target"`
Relationship string `json:"relationship"` // "additive", "multiplicative", "rate", "stoichiometric"
EquationIndex *int `json:"equation_index,omitempty"`
Expression Expression `json:"expression,omitempty"`
}
DependencyEdge represents an edge in the expression graph. Source and Target are node keys (VariableNode.Name), i.e. scoped names.