Version: dev

affect_equation

Stable type · Document types

Tier: stable · Kind: type · Topic: Document types

JuliaTypeScriptPythonRustGo
AffectEquationnot exportedAffectEquationAffectEquationAffectEquation

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

Source

TypeScript

TypeScript does not export this type.

Python

class AffectEquation
AffectEquation(lhs: str, rhs: Expr)

Equation that affects a variable (assignment-like).

Source

Rust

pub struct AffectEquation {
    pub lhs: String,
    pub rhs: Expr,
}

Equation that modifies state/parameters when event fires

Source · Rust docs

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

Source · Go docs