Skip to content

Export get_DEIM_indices, the index form of the DEIM interpolation matrix - #57

Merged
michakraus merged 2 commits into
mainfrom
deim/indices
Oct 14, 2026
Merged

michakraus merged 2 commits into
mainfrom
deim/indices

Conversation

@michakraus

Copy link
Copy Markdown
Member

Summary

  • Rename the internal _deim_indices(Ψ) to get_DEIM_indices(Ψ) and export it beside get_DEIM_interpolation_matrix.
  • The docstring describes it as public API: it returns the k rows that greedy DEIM selects, and it is the index form of get_DEIM_interpolation_matrix, Π' * A == A[p, :] for p = get_DEIM_indices(Ψ) and a finite A.
  • Update every use: get_DEIM_interpolation_matrix, the SymplecticDEIM constructor and its two docstring @refs, and both DEIM test files. The using ReducedBasisMethods: _deim_indices lines go, because the name is now exported.
  • New testset: get_DEIM_interpolation_matrix(Ψ)' * A == A[get_DEIM_indices(Ψ), :] on a random orthonormal basis, in Float32 and Float64.
  • CHANGELOG: one New Features bullet under [Unreleased]. No version bump; not breaking, because the old name was internal.
  • Docs: library.md uses @autodocs, so the new export appears with no page change.

Tests

  • test/algorithms/deim.jl, test/algorithms/symplectic_deim.jl and test/quality/aqua.jl: 397/397 pass.
  • JuliaFormatter (sciml) passes on the changed .jl files.

Pre-PR verification

Fixed

  • get_DEIM_indices docstring (src/algorithms/deim.jl): the identity Π' * A == A[p, :] was stated "for every N-row matrix A". It now says "finite". With an Inf or NaN in an unselected row of A, Π' * A has a column that is all NaN (0 * Inf), while A[p, :] stays finite. The comment of the new testset in test/algorithms/deim.jl has the same correction.

Unresolved

  • None.

Pre-existing / sequencing

Checked and clean

  • Callers: no use of the old name is left. _deim_indices is undefined after load, and get_DEIM_indices is public.
  • Type piracy: Aqua test_piracies passes.
  • Type stability: get_DEIM_indices infers Vector{Int64} for Float64, Float32, Int32 and reshaped inputs. get_DEIM_interpolation_matrix follows the element type. No Any originates at a changed line.
  • Allocations: fatou lint is clean on the changed files. The diff adds no allocating construct.
  • Comments: all comments and docstrings near the hunks are current and in the present tense. No history outside CHANGELOG.md.
  • The affected test files pass (algorithms/deim.jl, algorithms/symplectic_deim.jl, quality/aqua.jl: 397/397). JuliaFormatter passes.

Not checked

  • The full documentation build (makedocs).
  • Behaviour on the compat floor Julia version (checked on 1.13 only).

🤖 Generated with Claude Code

michakraus and others added 2 commits October 14, 2026 19:28
Rename the internal _deim_indices to get_DEIM_indices and export it beside
get_DEIM_interpolation_matrix. A test checks Π' * A == A[p, :] on a random
basis in Float32 and Float64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With an Inf or a NaN in an unselected row, 0 * Inf makes a column of
Π' * A NaN while A[p, :] stays finite.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.56%. Comparing base (882eeb2) to head (4816230).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #57   +/-   ##
=======================================
  Coverage   91.56%   91.56%           
=======================================
  Files          10       10           
  Lines         332      332           
=======================================
  Hits          304      304           
  Misses         28       28           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@michakraus
michakraus merged commit 0cca417 into main Oct 14, 2026
13 checks passed
@michakraus
michakraus deleted the deim/indices branch October 14, 2026 17:44
michakraus added a commit that referenced this pull request Oct 14, 2026
Resolve the conflicts with the 0.2.1 release and get_DEIM_indices (#57): the spectrumplot entry moves to a new Unreleased section, and the DEIM doctest follows the renamed reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant