Skip to content

Conversation

@putianyi889
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Mar 31, 2023

Pull Request Test Coverage Report for Build 4573381699

  • 2 of 2 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 94.622%

Totals Coverage Status
Change from base Build 4484183626: 0.01%
Covered Lines: 739
Relevant Lines: 781

💛 - Coveralls

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b40021e) 95.20% compared to head (9943371) 95.25%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   95.20%   95.25%   +0.05%     
==========================================
  Files           9        9              
  Lines         938      948      +10     
==========================================
+ Hits          893      903      +10     
  Misses         45       45              
Files Coverage Δ
src/ToeplitzMatrices.jl 90.62% <100.00%> (+3.12%) ⬆️
src/hankel.jl 96.29% <100.00%> (+0.09%) ⬆️

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


isconcrete(A::AbstractToeplitz) = isconcretetype(typeof(A.vc)) && isconcretetype(typeof(A.vr))
iszero(A::AbstractToeplitz) = iszero(A.vc) && iszero(A.vr)
diag(A::AbstractToeplitz) = Fill(A.vc[1], min(size(A)...))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done as a fill, right? That way, the dependency on FillArrays isn't needed (although it's not a bad idea in itself)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of Julia 1.9, how about using fill as the minimal feature and override it with Fill in the extension?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We wouldn't want to override a method, that'll hurt precompilation. Extensions are for adding extra methods.

That said, perhaps using FillArrays isn't a bad idea after all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If both vc and vr are lazy and large then using fill could cause a problem.

range(x, x, length=n) could mimic Fill(x, n) though.

@putianyi889 putianyi889 marked this pull request as draft May 27, 2023 09:54
@putianyi889
Copy link
Contributor Author

drafted to implement diag(A,k)

@putianyi889 putianyi889 marked this pull request as ready for review May 27, 2023 10:46
@jishnub
Copy link
Member

jishnub commented May 30, 2023

I think the length of the diag needs to be fixed here.

julia> T = Toeplitz([0,0,0], [0,4,0])
3×3 Toeplitz{Int64, Vector{Int64}, Vector{Int64}}:
 0  4  0
 0  0  4
 0  0  0

julia> diag(T, 1)
3-element Fill{Int64}, with entries equal to 4

julia> diag(Matrix(T), 1)
2-element Vector{Int64}:
 4
 4

@putianyi889
Copy link
Contributor Author

also need to test for large k. should return empty vector.

@putianyi889 putianyi889 marked this pull request as draft May 30, 2023 15:09
@putianyi889 putianyi889 marked this pull request as ready for review May 30, 2023 16:45
@putianyi889
Copy link
Contributor Author

need to test for rectangular ones and negative k for Hankel

@putianyi889 putianyi889 marked this pull request as draft May 30, 2023 16:47
@putianyi889 putianyi889 marked this pull request as ready for review May 30, 2023 17:34
@putianyi889 putianyi889 requested a review from jishnub June 10, 2023 22:03
@jishnub
Copy link
Member

jishnub commented Nov 1, 2023

Looks good to me

@jishnub jishnub merged commit 3d47002 into JuliaLinearAlgebra:master Nov 6, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 4573311994

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 94.622%

Files with Coverage Reduction New Missed Lines %
src/hankel.jl 2 93.75%
Totals Coverage Status
Change from base Build 4484183626: 0.01%
Covered Lines: 739
Relevant Lines: 781

💛 - Coveralls

@coveralls
Copy link

coveralls commented Aug 8, 2025

Pull Request Test Coverage Report for Build 4573381699

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 94.622%

Files with Coverage Reduction New Missed Lines %
src/hankel.jl 2 93.75%
Totals Coverage Status
Change from base Build 4484183626: 0.01%
Covered Lines: 739
Relevant Lines: 781

💛 - Coveralls

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.

3 participants