Skip to content

[WIP] FillArrays extension #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

[WIP] FillArrays extension #34

wants to merge 14 commits into from

Conversation

mtfishman
Copy link
Collaborator

This adds a package extension for FillArrays.jl to define specialized factorization overloads for certain types defined in that package, in particular Zeros that lazily represents a matrix of all zeros and Eye that lazily represents a square or rectangular identity matrix. We can of course support other FillArrays.jl types, but those are the ones I have a use case for and they are pretty simple so I focused on those for now.

The idea is that where possible the factorizations return factors that are either Zeros or Eye if that can be known at compile time (i.e. in a type stable way).

It looks like a lot of code, but the definitions are all pretty simple. The basic code pattern is that I overload copy_input and initialize_output to be no-ops since the objects are immutable, and then the factorization definitions construct the output types based on the sizes/axes of the inputs.

I've marked this as work-in-progress because it depends on changes made in #32 to avoid code duplication in default_algorithm definitions, and also that PR will make it a little easier to implement left_polar/right_polar (which still needs to be implemented). I also haven't implement left_null/right_null and haven't tested left_orth/right_orth, since this PR is already very big I may leave that for future work. However, it would still be good to get some feedback on the approach I'm using.

Copy link

codecov bot commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 190 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/MatrixAlgebraKitFillArraysExt.jl 0.00% 190 Missing ⚠️
Files with missing lines Coverage Δ
ext/MatrixAlgebraKitFillArraysExt.jl 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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