Skip to content

Fix SymmetricBlockMatrix constructors - #24

Merged
djukic14 merged 1 commit into
djukic14:mainfrom
Marsel-Safin:fix/symmetric-blockmatrix-constructors
Oct 26, 2026
Merged

djukic14 merged 1 commit into
djukic14:mainfrom
Marsel-Safin:fix/symmetric-blockmatrix-constructors

Conversation

@Marsel-Safin

Copy link
Copy Markdown
Contributor

Constructing a SymmetricBlockMatrix failed or ran needless coloring when the diagonal or off-diagonal block lists were empty.

  • Support empty, diagonal-only and off-diagonal-only matrices; infer the element type from the blocks or require SymmetricBlockMatrix{T}(...) when it cannot be inferred.
  • Skip conflict-graph coloring for SerialScheduler and use a single color instead, as BlockSparseMatrix already does.
  • Make coloringalgorithm an explicit keyword (default WorkstreamDSATUR).
  • Validate that block and index list lengths match.
  • Avoid copying index arrays that already have the expected type.

Behavior change: the tuple-size constructor now defaults to SerialScheduler() instead of DynamicScheduler(), consistent with the rows/cols constructor and BlockSparseMatrix. Pass
scheduler=DynamicScheduler() for parallel multiplication.

@Marsel-Safin
Marsel-Safin force-pushed the fix/symmetric-blockmatrix-constructors branch 2 times, most recently from 931f10e to 9706a4a Compare October 25, 2026 14:52
@djukic14
djukic14 force-pushed the fix/symmetric-blockmatrix-constructors branch from 36dc726 to 76d3c2a Compare October 26, 2026 13:34
Support empty, diagonal-only and off-diagonal-only matrices: infer the
element type from the blocks, or require SymmetricBlockMatrix{T}(...) when
it cannot be inferred. Skip conflict-graph coloring for SerialScheduler and
use a single color instead, as BlockSparseMatrix already does. Make
coloringalgorithm an explicit keyword (default WorkstreamDSATUR), validate
that block and index list lengths match, and avoid copying index arrays
that already have the expected type.

Behavior change: the tuple-size constructor now defaults to
SerialScheduler() instead of DynamicScheduler(), consistent with the
rows/cols constructor and BlockSparseMatrix. Pass
scheduler=DynamicScheduler() for parallel multiplication.

Also fix what blocked CI:
- docs: build trees with TwoNTree(X; builder=TwoNTreeBuilder(; minhalfsize=...))
  for the H2Trees 0.4 API
- compat: raise the lower bounds to Graphs 1.7.2 and Aqua 0.8.1 so the
  Downgrade job passes (Graphs < 1.7.2 has a sort! method ambiguity, Aqua
  0.8.0 fails its persistent-tasks check)
- tests: ignore the test dependencies in Aqua's stale-deps check, since the
  Downgrade workflow promotes them into [deps]

Co-authored-by: Marsel-Safin <marsel.gm1000@gmail.com>
@djukic14
djukic14 force-pushed the fix/symmetric-blockmatrix-constructors branch from 5c3a9e3 to f6a3156 Compare October 26, 2026 14:26
@djukic14
djukic14 merged commit 89157e9 into djukic14:main Oct 26, 2026
8 checks passed
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.

2 participants