Skip to content
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

Port truncate tests to C++ #45

Closed
terasakisatoshi opened this issue Dec 11, 2024 · 3 comments · Fixed by #46
Closed

Port truncate tests to C++ #45

terasakisatoshi opened this issue Dec 11, 2024 · 3 comments · Fixed by #46

Comments

@terasakisatoshi
Copy link
Contributor

@testset "truncate" begin
        sve = SparseIR.CentrosymmSVE(LogisticKernel(5), 1e-6, Float64)

        svds = SparseIR.compute_svd.(SparseIR.matrices(sve))
        u_, s_, v_ = zip(svds...)

        for lmax in 3:20
            u, s, v = SparseIR.truncate(u_, s_, v_; lmax)
            u, s, v = SparseIR.postprocess(sve, u, s, v)
            @test length(u) == length(s) == length(v)
            @test length(s)  lmax - 1
        end
    end
@terasakisatoshi
Copy link
Contributor Author

#46 was not sufficient.

@terasakisatoshi
Copy link
Contributor Author

Need to write the truncate function more seriously.

@terasakisatoshi
Copy link
Contributor Author

#51 fixed

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 a pull request may close this issue.

1 participant