affect_equation
Stable type · Document types
Tier: stable · Kind: type · Topic: Document types
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
AffectEquation | not exported | AffectEquation | AffectEquation | AffectEquation |
Julia
struct AffectEquation
AffectEquation(lhs::String, rhs::ASTExpr)
AffectEquation(lhs, rhs)
AffectEquation(lhs::String, rhs::ASTExpr)
Assignment equation for discrete events.
lhs: target variable name (string)rhs: expression for the new value
TypeScript
TypeScript does not export this type.
Python
class AffectEquation
AffectEquation(lhs: str, rhs: Expr)
Equation that affects a variable (assignment-like).
Rust
pub struct AffectEquation {
pub lhs: String,
pub rhs: Expr,
}
Equation that modifies state/parameters when event fires
Go
type AffectEquation struct {
LHS string `json:"lhs"` // variable name
RHS Expression `json:"rhs"` // expression
}
func (ae *AffectEquation) UnmarshalJSON(data []byte) error
AffectEquation represents an equation that affects a variable (for events)
Methods
func (ae *AffectEquation) UnmarshalJSON(data []byte) error
Custom JSON unmarshaling for AffectEquation