column_lines
Stable function · Sparsity and structure
Tier: stable · Kind: function · Topic: Sparsity and structure
| Julia | Python | Rust |
|---|---|---|
column_lines | column_lines | column_lines |
Julia
column_lines(entries::Vector{JacEntry}, sv::SysView, axis::String)
column_lines(entries, sv, axis::String) -> Union{NamedTuple, Nothing}
The per-line structure of a state Jacobian whose couplings all stay within
one line along index set axis, or nothing when one does not: every band
couples two array states of one common shape that holds axis once, and
at every band point the column equals the row in every other dimension. A
point reading past the axis is a ghost read and does not count. Returns
(axis, dim, line_length, block_vars, kl, ku, pattern): kl / ku the
largest distances below / above the diagonal any point reaches along the
axis, and pattern their name — "dense" (both span the line), "lower",
"upper", or "banded" — read off the exact band points, never probed.
Python
column_lines(entries: list[JacEntry], sv: SysView, axis: str) -> dict | None
The per-line structure of a state Jacobian whose couplings all stay
within one line along index set axis, or None when one does not
(structure.jl column_lines): every band couples two array states of
one common shape that holds axis once, and at every band point the
column equals the row in every other dimension. A point reading past the
axis is a ghost read and does not count. Returns a dict with axis,
dim (1-based), line_length, block_vars, kl / ku (the
largest distances below / above the diagonal any point reaches along the
axis) and pattern — "dense", "lower", "upper" or
"banded" — read off the exact band points, never probed.
Rust
pub fn column_lines(entries: &[JacEntry], sv: &SysView<'_>, ctx: &Ctx, axis: &str) -> Result<Option<ColumnLines>, BandError>
The per-line structure of a state Jacobian along index set axis, or
None when a coupling leaves its line: every band couples two array
states of one common shape that holds axis once, and at every band
point the column equals the row in every other dimension. A point
reading past the axis is a ghost read and does not count. kl / ku
and their pattern name are read off the exact band points (guards
applied), never probed.