Version: dev

select

Stable function · Other

Tier: stable · Kind: function · Topic: Other

JuliaTypeScriptPythonRustGo
selectnot exportedselectnot exportednot exported

Julia

select(prog::EarthSciAST.RhsProgram; writes, terms)
select(prog::RhsProgram; writes = :all, terms = :all) -> RhsProgram

The program of one operator (API_SPEC §5.8, “Selection”): every flattened equation keeps the contributions whose #539 origins intersect terms (a vector of TermOrigin , matched by equality; :all keeps every one), summed as a left fold in their original order; equations whose target is not in writes (a vector of flattened state names, or :all) are dropped, and a kept equation with no kept contribution writes 0. The result’s u covers writes and its aux the other states the kept rules read.

A selection of a selection composes: its terms keep only the contributions both selections keep, and its writes (:all meaning prog’s own) must be variables prog writes.

Raises range_selection_writes_incomplete when a variable outside writes has a kept contribution.

Source

TypeScript

TypeScript does not export this function.

Python

select(prog: Any, *, writes: Any = 'all', terms: Any = 'all') -> Any

One operator’s program, by provenance. Raises compiler_unavailable.

Source

Rust

Rust does not export this function.

Go

Go does not export this function.