Coder Social home page Coder Social logo

matrixfactorizations.jl's People

Contributors

andreasnoack avatar dependabot[bot] avatar dkarrasch avatar dlfivefifty avatar jishnub avatar juliatagbot avatar marco-congedo avatar ralphas avatar ranocha avatar tsgut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

matrixfactorizations.jl's Issues

Cholesky and Inverse Cholesky in one pass

Hello,

I wrote a function for computing the Cholesky factor and its inverse in one pass. For small matrices this appears considerably faster than computing the Cholesky factor and inverting it with LinearAlgebra. Would that be interesting for this package?

For the moment being i am hosting it in the PosDefManifold.jl package
as the choInv function

Here is a quick benchmark:

using PosDefManifold, BenchmarkTools
P=randP(10)

using LinearAlgebra

function t(P)
       C=cholesky(P)
       return C.L, inv(C.L)
end
julia> @benchmark(t(P))
BenchmarkTools.Trial:
  memory estimate:  3.69 KiB
  allocs estimate:  12
  --------------
  minimum time:     40.800 μs (0.00% GC)
  median time:      47.201 μs (0.00% GC)
  mean time:        48.117 μs (0.00% GC)
  maximum time:     291.300 μs (0.00% GC)
  --------------
  samples:          10000
  evals/sample:     1

using function choInv

julia> @benchmark(choInv(P))
BenchmarkTools.Trial:
  memory estimate:  6.09 KiB
  allocs estimate:  23
  --------------
  minimum time:     1.530 μs (0.00% GC)
  median time:      1.690 μs (0.00% GC)
  mean time:        2.883 μs (14.91% GC)
  maximum time:     563.430 μs (98.69% GC)
  --------------
  samples:          10000
  evals/sample:     10

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

v2.1.1 results an invalidation that accesses undefined refs

With Julia +1.9.

Note that, the issue doesn't appear with v2.1.0.

Repro:

] add FastAlmostBandedMatrix, MatrixFactorizations@2.1.1

Or,

] add NonlinearSolve, MatrixFactorizations@2.1.1
        Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`
[ Info: Precompiling NonlinearSolve [8913a72c-1f9b-4ce2-8d82-65094dcecaec]
WARNING: Method definition *(MatrixFactorizations.LayoutQ{T} where T, MatrixFactorizations.LayoutQ{T} where T) in module MatrixFactorizations at C:\Users\user\.julia\packages\MatrixFactorizations\wSXzP\src\MatrixFactorizations.jl:124 overwritten at C:\Users\user\.julia\packages\MatrixFactorizations\wSXzP\src\MatrixFactorizations.jl:70.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition *(MatrixFactorizations.LayoutQ{T} where T, MatrixFactorizations.LayoutQ{T} where T) in module MatrixFactorizations at C:\Users\user\.julia\packages\MatrixFactorizations\wSXzP\src\MatrixFactorizations.jl:124 overwritten at C:\Users\user\.julia\packages\MatrixFactorizations\wSXzP\src\MatrixFactorizations.jl:70.
  ** incremental compilation may be fatally broken for this module **

ERROR: LoadError: UndefRefError: access to undefined reference
Stacktrace:
 [1] getindex
   @ .\essentials.jl:13 [inlined]
 [2] invalidation_leaves(invlist::Vector{Any})
   @ PrecompileTools C:\Users\user\.julia\packages\PrecompileTools\L8A3n\src\invalidations.jl:42
 [3] recompile_invalidations(__module__::Module, expr::Any)
   @ PrecompileTools C:\Users\user\.julia\packages\PrecompileTools\L8A3n\src\invalidations.jl:23
 [4] top-level scope
   @ C:\Users\user\.julia\packages\NonlinearSolve\KlGj2\src\NonlinearSolve.jl:10
 [5] include
   @ .\Base.jl:457 [inlined]
 [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
   @ Base .\loading.jl:2049
 [7] top-level scope
   @ stdin:3
in expression starting at C:\Users\user\.julia\packages\NonlinearSolve\KlGj2\src\NonlinearSolve.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile NonlinearSolve [8913a72c-1f9b-4ce2-8d82-65094dcecaec] to "C:\\Users\\user\\.julia\\compiled\\v1.9\\NonlinearSolve\\jl_83D6.tmp".
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base .\loading.jl:2294
 [3] compilecache
   @ .\loading.jl:2167 [inlined]
 [4] _require(pkg::Base.PkgId, env::String)
   @ Base .\loading.jl:1805
 [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
   @ Base .\loading.jl:1660
 [6] macro expansion
   @ .\loading.jl:1648 [inlined]
 [7] macro expansion
   @ .\lock.jl:267 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:1611

Unpacking of Q, from ql decomp fails for tall matrix.

MatrixFactorizations = v"0.9.6"
LinearAlgebra = v"0.0.0" ?!? #sorry but I don't why this is reporting 0.0.0
Julia = v"1.6.7"

using MatrixFactorizations,LinearAlgebra,Test
A=randn(8,4)
Q, L = ql(A)
@test norm(Q*L-A)<1e-14 #Fine with typeof(Q) == QLPackedQ
QM=Matrix(Q)
@test norm(QM*L-A)<1e-14 #Fails after unpacking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.