band_entry
Stable type · The planner
Tier: stable · Kind: type · Topic: The planner
| Julia | Rust |
|---|---|
BandEntry | not exported |
Julia
struct BandEntry
BandEntry(en::EarthSciASTDiff.JacEntry)
BandEntry(en::EarthSciASTDiff.JacEntry, row::AbstractString)
BandEntry(row::String, col::String, rows::Vector{Tuple{Int64, Int64}}, row_idx::Vector{Union{Int64, String}}, col_idx::Vector{Any}, contracted::Vector{Tuple{String, Int64, Int64}}, guard)
BandEntry(row, col, rows, row_idx, col_idx, contracted, guard)
BandEntry(row, col, rows, row_idx, col_idx)
BandEntry(row, col, rows, row_idx, col_idx, contracted)
BandEntry(d::AbstractDict)
BandEntry
One entry of EarthSciASTDiff’s band list (esm-jacobian-spec §4), in the form
its serialize_band writes, without coef:
row,col: the row and column variables (flattened names);rows: per dimension ofrow, the inclusive range(lo, hi); empty for a scalar row;row_idx: per dimension ofrow, an index name (String) or an integer;col_idx: per dimension ofcol, an expression in EarthSciAST’s serialized form (a nameString, anIntegerliteral, aFloat64literal, or aDictwith"op"and"args"); empty for a scalar column;contracted: free contracted dimensions(name, lo, hi), possibly empty;guard: the band’swhereguard in serialized form, ornothing. A cell where it evaluates to zero is not a point of the band.
DiffBackend
builds these from EarthSciASTDiff.serialize_band’s output.
A BandEntry from serialize_band’s dictionary (its coef, if present, is ignored).
BandEntry(en::EarthSciASTDiff.JacEntry, row = en.u)
The BandEntry
of BandEntry(band_json(en)), with row row. Its
coefficient, which pass 2 never reads (§5.2.2; pass 2’s entries are
structure-only and have none), is replaced by the literal 0 before
serialize_band writes the entry, so a full entry’s coefficient is never
serialized; every other field is read through serialize_band, as for the
operator’s bands.
Rust
Rust does not export this type.