Giter Site home page Giter Site logo

specialmatrices.jl's Introduction

SpecialMatrices.jl

action status pkgeval status codecov coveralls license docs-stable docs-dev deps version pkgeval

https://github.com/JuliaLinearAlgebra/SpecialMatrices.jl

A Julia package for working with special matrix types.

This Julia package extends the LinearAlgebra library with support for special matrices that are used in linear algebra. Every special matrix has its own type and is stored efficiently. The full matrix is accessed by the command Matrix(A).

Installation

julia> ] add SpecialMatrices

Related packages

ToeplitzMatrices.jl supports Toeplitz, Hankel, and circulant matrices.

Currently supported special matrices

Cauchy(x,y)[i,j] = 1/(x[i] + y[j])
Cauchy(x) = Cauchy(x,x)
Cauchy(k::Int) = Cauchy(1:k)

julia> Cauchy([1,2,3],[3,4,5])
3×3 Cauchy{Int64}:
 0.25      0.2       0.166667
 0.2       0.166667  0.142857
 0.166667  0.142857  0.125

julia> Cauchy([1,2,3])
3×3 Cauchy{Int64}:
 0.5       0.333333  0.25
 0.333333  0.25      0.2
 0.25      0.2       0.166667

julia> Cauchy(3)
3×3 Cauchy{Float64}:
 0.5       0.333333  0.25
 0.333333  0.25      0.2
 0.25      0.2       0.166667
julia> A=Companion([3,2,1])
3×3 Companion{Int64}:
 0  0  -3
 1  0  -2
 0  1  -1

Also, directly from a polynomial:

julia> using Polynomials

julia> P=Polynomial([2.0,3,4,5])
Polynomial(2 + 3x + 4x^2 + 5x^3)

julia> C=Companion(P)
3×3 Companion{Float64}:
 0.0  0.0  -0.4
 1.0  0.0  -0.6
 0.0  1.0  -0.8

Example

julia> using SpecialMatrices

julia> F=Frobenius(3, [1.0,2.0,3.0]) #Specify subdiagonals of column 3
6×6 Frobenius{Float64}:
 1.0  0.0  0.0  0.0  0.0  0.0
 0.0  1.0  0.0  0.0  0.0  0.0
 0.0  0.0  1.0  0.0  0.0  0.0
 0.0  0.0  1.0  1.0  0.0  0.0
 0.0  0.0  2.0  0.0  1.0  0.0
 0.0  0.0  3.0  0.0  0.0  1.0

julia> inv(F) #Special form of inverse
6×6 Frobenius{Float64}:
 1.0  0.0   0.0  0.0  0.0  0.0
 0.0  1.0   0.0  0.0  0.0  0.0
 0.0  0.0   1.0  0.0  0.0  0.0
 0.0  0.0  -1.0  1.0  0.0  0.0
 0.0  0.0  -2.0  0.0  1.0  0.0
 0.0  0.0  -3.0  0.0  0.0  1.0

julia> F*F #Special form preserved if the same column has the subdiagonals
6×6 Frobenius{Float64}:
 1.0  0.0  0.0  0.0  0.0  0.0
 0.0  1.0  0.0  0.0  0.0  0.0
 0.0  0.0  1.0  0.0  0.0  0.0
 0.0  0.0  2.0  1.0  0.0  0.0
 0.0  0.0  4.0  0.0  1.0  0.0
 0.0  0.0  6.0  0.0  0.0  1.0

julia> F*Frobenius(2, [5.0,4.0,3.0,2.0]) #Promotes to Matrix
6×6 Matrix{Float64}:
 1.0   0.0  0.0  0.0  0.0  0.0
 0.0   1.0  0.0  0.0  0.0  0.0
 0.0   5.0  1.0  0.0  0.0  0.0
 0.0   9.0  1.0  1.0  0.0  0.0
 0.0  13.0  2.0  0.0  1.0  0.0
 0.0  17.0  3.0  0.0  0.0  1.0

julia> F*[10.0,20,30,40,50,60.0]
6-element Vector{Float64}:
  10.0
  20.0
  30.0
  70.0
 110.0
 150.0
julia> A=Hilbert(5)
5×5 Hilbert{Rational{Int64}}:
 1//1  1//2  1//3  1//4  1//5
 1//2  1//3  1//4  1//5  1//6
 1//3  1//4  1//5  1//6  1//7
 1//4  1//5  1//6  1//7  1//8
 1//5  1//6  1//7  1//8  1//9

Inverses are also integer matrices:

julia> inv(A)
5×5 InverseHilbert{Rational{Int64}}:
    25//1    -300//1     1050//1    -1400//1     630//1
  -300//1    4800//1   -18900//1    26880//1  -12600//1
  1050//1  -18900//1    79380//1  -117600//1   56700//1
 -1400//1   26880//1  -117600//1   179200//1  -88200//1
   630//1  -12600//1    56700//1   -88200//1   44100//1
julia> Kahan(5,5,1,35)
5×5 Kahan{Int64,Int64}:
 1.0  -0.540302  -0.540302  -0.540302  -0.540302
 0.0   0.841471  -0.454649  -0.454649  -0.454649
 0.0   0.0        0.708073  -0.382574  -0.382574
 0.0   0.0        0.0        0.595823  -0.321925
 0.0   0.0        0.0        0.0        0.501368

julia> Kahan(5,3,0.5,0)
5×3 Kahan{Float64,Int64}:
 1.0  -0.877583  -0.877583
 0.0   0.479426  -0.420735
 0.0   0.0        0.229849
 0.0   0.0        0.0
 0.0   0.0        0.0

julia> Kahan(3,5,0.5,1e-3)
3×5 Kahan{Float64,Float64}:
 1.0  -0.877583  -0.877583  -0.877583  -0.877583
 0.0   0.479426  -0.420735  -0.420735  -0.420735
 0.0   0.0        0.229849  -0.201711  -0.201711

For more details see N. J. Higham (1987).

Riemann matrix

Riemann matrix is defined as A = B[2:N+1, 2:N+1], where B[i,j] = i-1 if i divides j, and -1 otherwise. Riemann hypothesis holds if and only if det(A) = O( N! N^(-1/2+ϵ)) for every ϵ > 0.

julia> Riemann(7)
7×7 Riemann{Int64}:
  1  -1   1  -1   1  -1   1
 -1   2  -1  -1   2  -1  -1
 -1  -1   3  -1  -1  -1   3
 -1  -1  -1   4  -1  -1  -1
 -1  -1  -1  -1   5  -1  -1
 -1  -1  -1  -1  -1   6  -1
 -1  -1  -1  -1  -1  -1   7

For more details see F. Roesler (1986).

A special symmetric, tridiagonal, Toeplitz matrix named after Gilbert Strang.

julia> Strang(6)
6×6 Strang{Int64}:
  2  -1   0   0   0   0
 -1   2  -1   0   0   0
  0  -1   2  -1   0   0
  0   0  -1   2  -1   0
  0   0   0  -1   2  -1
  0   0   0   0  -1   2
julia> a = 1:5
julia> A = Vandermonde(a)
5×5 Vandermonde{Int64}:
 1  1   1    1    1
 1  2   4    8   16
 1  3   9   27   81
 1  4  16   64  256
 1  5  25  125  625

Adjoint Vandermonde:

julia> A'
5×5 adjoint(::Vandermonde{Int64}) with eltype Int64:
 1   1   1    1    1
 1   2   3    4    5
 1   4   9   16   25
 1   8  27   64  125
 1  16  81  256  625

The backslash operator \ is overloaded to solve Vandermonde and adjoint Vandermonde systems in O(n^2) time using the algorithm of Björck & Pereyra (1970).

julia> A \ a
5-element Vector{Float64}:
 0.0
 1.0
 0.0
 0.0
 0.0

julia> A' \ A[2,:]
5-element Vector{Float64}:
 0.0
 1.0
 0.0
 0.0
 0.0

specialmatrices.jl's People

Contributors

andreasnoack avatar chrisrackauckas avatar christopher-dg avatar dependabot[bot] avatar devmotion avatar dlfivefifty avatar fkastner avatar fp4code avatar hurak avatar ivanslapnicar avatar jefffessler avatar jiahao avatar jishnub avatar juliatagbot avatar ludvigak avatar mkitti avatar singularitti avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

specialmatrices.jl's Issues

[PkgEval] SpecialMatrices may have a testing issue on Julia 0.3 (2014-06-10)

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.2) and the nightly build of the unstable version (0.3). The results of this script are used to generate a package listing enhanced with testing results.

On Julia 0.3

  • On 2014-06-04 the testing status was Tests pass.
  • On 2014-06-10 the testing status changed to Tests fail, but package loads.

Tests pass. means that PackageEvaluator found the tests for your package, executed them, and they all passed.

Tests fail, but package loads. means that PackageEvaluator found the tests for your package, executed them, and they didn't pass. However, trying to load your package with using worked.

This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.

Test log:

INFO: Installing SpecialMatrices v0.1.1
INFO: Package database updated
ERROR: assertion failed: |full(inv(Z)) - inv(full(Z))| <= 1.7985612998927536e-10
  full(inv(Z)) = [1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.4741883350648852 1.0]
  inv(full(Z)) = [1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 -0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 -0.0 -0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0
 -0.0 -0.0 -0.0 1.0 0.0 0.0 0.0 0.0 0.0
 -0.0 -0.0 -0.0 -0.0 1.0 0.0 0.0 0.0 0.0
 -0.0 -0.0 -0.0 -0.0 -0.0 1.0 0.0 0.0 0.0
 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 1.0 0.0 0.0
 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 1.0 0.0
 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -1.4741883350648852 1.0]
  difference = 1.4741883350648852 > 1.7985612998927536e-10
 in error at error.jl:22
 in test_approx_eq at test.jl:109
 in test_approx_eq at test.jl:119
 in include at boot.jl:244 (repeats 2 times)
 in include_from_node1 at loading.jl:128
while loading /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/test/frobenius.jl, in expression starting on line 6
while loading /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/test/runtests.jl, in expression starting on line 5
INFO: Package database updated

compatibility Julia v0.4.5

Hi, thanks for the package!

I am still on the Julia version 0.4.5, and I went through some compatibility issues while updating the package. It seems to be solved by changing the struct to immutable in companion.jl, hankel.jl and toeplitz.jl

Error Companion Matrix

I get the following error when trying to create the companion Matrix. Below is the error that I am getting. I am using the same example as specified in the example i.e

A=Companion([3,2,1])

Error displaying SpecialMatrices.Companion{Float64}: MethodError: isassigned(::SpecialMatrices.Companion{Float64}, ::Int64, ::Int64) is ambiguous. Candidates:
isassigned(C::SpecialMatrices.Companion, i, j) at /Users/chahatsharma/.julia/v0.5/SpecialMatrices/src/companion.jl:18
isassigned(a::AbstractArray, i::Int64...) at abstractarray.jl:185
in alignment(::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}, ::SpecialMatrices.Companion{Float64}, ::Array{Int64,1}, ::Array{Int64,1}, ::Int64, ::Int64, ::Int64) at show.jl:1277
in print_matrix(::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}, ::SpecialMatrices.Companion{Float64}, ::String, ::String, ::String, ::String, ::String, ::String, ::Int64, ::Int64) at show.jl:1407
in print_matrix(::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}, ::SpecialMatrices.Companion{Float64}, ::String, ::String, ::String) at show.jl:1379
in #showarray#342(::Bool, ::Function, ::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}, ::SpecialMatrices.Companion{Float64}, ::Bool) at show.jl:1618
in (::Juno.##1#2{SpecialMatrices.Companion{Float64}})(::Base.AbstractIOBuffer{Array{UInt8,1}}) at types.jl:11
in #sprint#316(::Void, ::Function, ::Int64, ::Function) at io.jl:37
in Type at types.jl:51 [inlined]
in Type at types.jl:52 [inlined]
in render(::Juno.Console, ::SpecialMatrices.Companion{Float64}) at types.jl:16
in render′(::Juno.Console, ::SpecialMatrices.Companion{Float64}) at errors.jl:89
in (::Atom.##65#68)() at eval.jl:104
in withpath(::Atom.##65#68, ::Void) at utils.jl:30
in withpath(::Function, ::Void) at eval.jl:38
in macro expansion at eval.jl:101 [inlined]
in (::Atom.##64#67{Dict{String,Any}})() at task.jl:60

Corrections needed for 0.5.0

Jiahao,

greetings!
In 0.5.0 the package does not work. Attached is the small example notebook.
Can you please tell me how to correct it. I will than go through rest of the files
(and also implement the more appropriate indexing, as in the example).

Cheers, Ivan

SmallCheck.txt

[PkgEval] SpecialMatrices may have a testing issue on Julia 0.3 (2014-06-27)

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.2) and the nightly build of the unstable version (0.3). The results of this script are used to generate a package listing enhanced with testing results.

On Julia 0.3

  • On 2014-06-26 the testing status was Tests pass.
  • On 2014-06-27 the testing status changed to Tests fail, but package loads.

Tests pass. means that PackageEvaluator found the tests for your package, executed them, and they all passed.

Tests fail, but package loads. means that PackageEvaluator found the tests for your package, executed them, and they didn't pass. However, trying to load your package with using worked.

This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.

Test log:

INFO: Installing SpecialMatrices v0.1.2
INFO: Package database updated
ERROR: no method Diagonal{T}(Float64)
 in strang at /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/src/strang.jl:7
 in * at /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/src/strang.jl:15
 in include at ./boot.jl:244
 in include_from_node1 at ./loading.jl:128
 in include at ./boot.jl:244
 in include_from_node1 at loading.jl:128
 in process_options at ./client.jl:285
 in _start at ./client.jl:354
while loading /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/test/strang.jl, in expression starting on line 6
while loading /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/test/runtests.jl, in expression starting on line 6
INFO: Package database updated

Overload Base.map

I think it would make sense for some types, like Vandermonde and Companion, to overload Base.map. The goal is to make things like map(Float32, Vandermonde([0.5, 3])) isa Vandermonde{Float32} hold.

Any objections?

Avoid redundancy with ToeplitzMatrices.jl

Toeplitz and Circulant are present in ToeplitzMatrices.jl with a lot more functionality.

I'd suggest just removing these from this package and refer users to ToeplitzMatrices.jl for these matrices.

Info about upcoming removal of packages in the General registry

As described in https://discourse.julialang.org/t/ann-plans-for-removing-packages-that-do-not-yet-support-1-0-from-the-general-registry/ we are planning on removing packages that do not support 1.0 from the General registry. This package has been detected to not support 1.0 and is thus slated to be removed. The removal of packages from the registry will happen approximately a month after this issue is open.

To transition to the new Pkg system using Project.toml, see https://github.com/JuliaRegistries/Registrator.jl#transitioning-from-require-to-projecttoml.
To then tag a new version of the package, see https://github.com/JuliaRegistries/Registrator.jl#via-the-github-app.

If you believe this package has erroneously been detected as not supporting 1.0 or have any other questions, don't hesitate to discuss it here or in the thread linked at the top of this post.

Strang matrix factorization - MethodError

Minimal example:

julia> using LinearAlgebra

julia> N = 5
5

julia> A = Tridiagonal(-1 .* ones(N - 1), 2 .* ones(N), -1 .* ones(N-1))
5×5 Tridiagonal{Float64, Vector{Float64}}:
  2.0  -1.0    ⋅     ⋅     ⋅
 -1.0   2.0  -1.0    ⋅     ⋅
   ⋅   -1.0   2.0  -1.0    ⋅
   ⋅     ⋅   -1.0   2.0  -1.0
   ⋅     ⋅     ⋅   -1.0   2.0

julia> factorize(A)
LU{Float64, Tridiagonal{Float64, Vector{Float64}}}
L factor:
5×5 Matrix{Float64}:
  1.0   0.0        0.0    0.0  0.0
 -0.5   1.0        0.0    0.0  0.0
  0.0  -0.666667   1.0    0.0  0.0
  0.0   0.0       -0.75   1.0  0.0
  0.0   0.0        0.0   -0.8  1.0
U factor:
5×5 Matrix{Float64}:
 2.0  -1.0   0.0       0.0    0.0
 0.0   1.5  -1.0       0.0    0.0
 0.0   0.0   1.33333  -1.0    0.0
 0.0   0.0   0.0       1.25  -1.0
 0.0   0.0   0.0       0.0    1.2
julia> using SpecialMatrices

julia> B = Strang(5)
5×5 Strang{Float64}:
  2  -1   0   0   0
 -1   2  -1   0   0
  0  -1   2  -1   0
  0   0  -1   2  -1
  0   0   0  -1   2

julia> factorize(B)
ERROR: MethodError: no method matching factorize(::Strang{Float64})
Closest candidates are:
  factorize(::StridedMatrix{T}) where T at C:\Users\Braam\.julia\juliaup\julia-1.7.2+0~x64\share\julia\stdlib\v1.7\LinearAlgebra\src\dense.jl:1302
  factorize(::Adjoint) at C:\Users\Braam\.julia\juliaup\julia-1.7.2+0~x64\share\julia\stdlib\v1.7\LinearAlgebra\src\dense.jl:1376
  factorize(::Transpose) at C:\Users\Braam\.julia\juliaup\julia-1.7.2+0~x64\share\julia\stdlib\v1.7\LinearAlgebra\src\dense.jl:1377
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[17]:1

Extending Circulant Functionality

I would like to see the functionality associated with the circulant matrices be extended and would therefore like to understand whether that's something people are interested in pursuing. I made #13 a while ago (sorry about that, it was rude to submit such a large PR like that without discussing any of it first) which outlined the kind of things I'm interested in achieving.

It would be useful for my work if there is support for the addition, multiplication, (log) determinant computation and transposition of circulant matrices, since they can all be performed efficiently - there are other operations for which circulant matrices admit efficient computation but these would be a good start. Also, extending multiplication of circulant matrices by dense matrices / vectors from just matrix-vector to matrix-matrix seems reasonable as analogous performance gains are made.

Similarly, the eigendecomposition of circulant matrices can be represented in O(N) time, since the eigenvector matrix is just the DFT matrix which requires O(1) memory (which raises the question of whether it's worth also supporting the DFT matrix for syntactic convenience).

Is this kind of extension of interest?

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.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Julia 1.1 Compatibility

Can a Julia 1.1 compatible release be created?
Now I can only add SpecialMatrices to Julia 1.1 using dev.

Vandermonde inverse

Here I have a module with a short and simple implementation of a Vandermonde matrix inverse:

https://gitlab.com/nsajko/PolynomialPassingThroughIntervals.jl/-/blob/main/src/VandermondeInverse.jl

The module depends on the SkipVectors module, located in the same directory.

As far as I remember VandermondeInverse.vandermonde_inv offers a huge improvement in accuracy over using SpecialMatrices.jl, and sometimes it's significantly faster, too.

Do you want a PR? If so, do you have any suggestions regarding the code, or testing, or perhaps do you want some benchmarks?

Polynomials 1.0 no longer exports Poly

Hello,

a current installation of SpecialMatrices pulls in Polynomials 1.0.0 as a dependency, which no longer exports the Poly type (it has two poly types, Polynomial and PolyCompat now), which causes precompilation to fail.

Special Matrix Transpose

Hi,

When I try to transpose a Vandermonde matrix, I get the following error message:

ERROR: ctranspose not implemented for SpecialMatrices.Vandermonde{Float64}. Consider adding parentheses, e.g. A_(B_C') instead of A_B_C' to avoid explicit calculation of the transposed matrix.

writing it in Parentheses didnt help.

Companion issue

In the REPL, the line

Companion([1;2;3])

throws this error:

Error showing value of type SpecialMatrices.Companion{Int64}:
ERROR: MethodError: isassigned(::SpecialMatrices.Companion{Int64}, ::Int64, ::Int64) is ambiguous. Candidates:
  isassigned(C::SpecialMatrices.Companion, i, j) at /home/jkersulis/.julia/v0.5/SpecialMatrices/src/companion.jl:18
  isassigned(a::AbstractArray, i::Int64...) at abstractarray.jl:185
 in alignment(::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Companion{Int64}, ::Array{Int64,1}, ::Array{Int64,1}, ::Int64, ::Int64, ::Int64) at ./show.jl:1277
 in print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Companion{Int64}, ::String, ::String, ::String, ::String, ::String, ::String, ::Int64, ::Int64) at ./show.jl:1407
 in print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Companion{Int64}, ::String, ::String, ::String) at ./show.jl:1379
 in #showarray#330(::Bool, ::Function, ::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Companion{Int64}, ::Bool) at ./show.jl:1618
 in display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::MIME{Symbol("text/plain")}, ::SpecialMatrices.Companion{Int64}) at ./REPL.jl:132
 in display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::SpecialMatrices.Companion{Int64}) at ./REPL.jl:135
 in display(::SpecialMatrices.Companion{Int64}) at ./multimedia.jl:143
 in print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:154
 in print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:139
 in (::Base.REPL.##22#23{Bool,Base.REPL.##33#42{Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:652
 in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at ./LineEdit.jl:1579
 in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at ./REPL.jl:903
 in run_repl(::Base.REPL.LineEditREPL, ::Base.##930#931) at ./REPL.jl:188
 in _start() at ./client.jl:360

Can anyone else reproduce this?

[PkgEval] SpecialMatrices may have a testing issue on Julia 0.3 (2014-06-14)

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.2) and the nightly build of the unstable version (0.3). The results of this script are used to generate a package listing enhanced with testing results.

On Julia 0.3

  • On 2014-06-13 the testing status was Tests pass.
  • On 2014-06-14 the testing status changed to Tests fail, but package loads.

Tests pass. means that PackageEvaluator found the tests for your package, executed them, and they all passed.

Tests fail, but package loads. means that PackageEvaluator found the tests for your package, executed them, and they didn't pass. However, trying to load your package with using worked.

This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.

Test log:

INFO: Installing SpecialMatrices v0.1.1
INFO: Package database updated
ERROR: BoundsError()
 in diagind at linalg/dense.jl:109
 in convert at linalg/tridiag.jl:24
 in * at /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/src/strang.jl:14
 in include at ./boot.jl:244
 in include_from_node1 at ./loading.jl:128
 in include at ./boot.jl:244
 in include_from_node1 at loading.jl:128
 in process_options at ./client.jl:285
 in _start at ./client.jl:354
while loading /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/test/strang.jl, in expression starting on line 6
while loading /home/idunning/pkgtest/.julia/v0.3/SpecialMatrices/test/runtests.jl, in expression starting on line 6
INFO: Package database updated

Printing of matrices causes error in the REPL

You can try this to reproduce,

> Hankel(rand(11))
Error showing value of type SpecialMatrices.Hankel{Float64}:
ERROR: MethodError: isassigned(::SpecialMatrices.Hankel{Float64}, ::Int64, ::Int64) is ambiguous. Candidates:
  isassigned(H::SpecialMatrices.Hankel, i, j) in SpecialMatrices at /home/jagan/.julia/v0.6/SpecialMatrices/src/hankel.jl:10
  isassigned(a::AbstractArray, i::Int64...) in Base at abstractarray.jl:221
Possible fix, define
  isassigned(::SpecialMatrices.Hankel, ::Int64, ::Int64)
Stacktrace:
 [1] alignment(::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Hankel{Float64}, ::Array{Int64,1}, ::Array{Int64,1}, ::Int64, ::Int64, ::Int64) at ./show.jl:1357
 [2] print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Hankel{Float64}, ::String, ::String, ::String, ::String, ::String, ::String, ::Int64, ::Int64) at ./show.jl:1487
 [3] print_matrix(::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Hankel{Float64}, ::String, ::String, ::String) at ./show.jl:1459
 [4] #showarray#263(::Bool, ::Function, ::IOContext{Base.Terminals.TTYTerminal}, ::SpecialMatrices.Hankel{Float64}, ::Bool) at ./show.jl:1709
 [5] display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::MIME{Symbol("text/plain")}, ::SpecialMatrices.Hankel{Float64}) at ./REPL.jl:122
 [6] display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::SpecialMatrices.Hankel{Float64}) at ./REPL.jl:125
 [7] display(::SpecialMatrices.Hankel{Float64}) at ./multimedia.jl:194
 [8] print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:144
 [9] print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:129
 [10] (::Base.REPL.#do_respond#16{Bool,Base.REPL.##26#36{Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:646
 [11] run_repl(::Base.REPL.LineEditREPL, ::Base.##507#508) at ./REPL.jl:180

I don't if the printing is supposed to work or not though.

Cauchy type mismatch

The Cauchy type claims it is a subtype of AbstractArray{T} but the T is incorrect in general:

julia> C = Cauchy([1,2,3])
3×3 Cauchy{Int64}:
 0.5       0.333333  0.25
 0.333333  0.25      0.2
 0.25      0.2       0.166667

Here the Cauchy "type" is Int64 but the elements of the matrix are Float64.
I don't have time to fix this right now but I am logging the issue for future work.
A related PR #17 does not appear to solve this issue BTW.

[PkgEval] SpecialMatrices may have a testing issue on Julia 0.2 (2014-05-30)

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.2) and the nightly build of the unstable version (0.3). The results of this script are used to generate a package listing enhanced with testing results.

On Julia 0.2

  • On 2014-05-29 the testing status was Tests pass..
  • On 2014-05-30 the testing status changed to Tests fail, but package loads..

Tests pass. means that PackageEvaluator found the tests for your package, executed them, and they all passed.

Tests fail, but package loads. means that PackageEvaluator found the tests for your package, executed them, and they didn't pass. However, trying to load your package with using worked.

This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.

[PkgEval] SpecialMatrices may have a testing issue on Julia 0.2 (2014-07-09)

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.2) and the nightly build of the unstable version (0.3). The results of this script are used to generate a package listing enhanced with testing results.

On Julia 0.2

  • On 2014-07-08 the testing status was Tests pass.
  • On 2014-07-09 the testing status changed to Tests fail, but package loads.

Tests pass. means that PackageEvaluator found the tests for your package, executed them, and they all passed.

Tests fail, but package loads. means that PackageEvaluator found the tests for your package, executed them, and they didn't pass. However, trying to load your package with using worked.

This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.

Test log:

INFO: Cloning cache of SpecialMatrices from git://github.com/jiahao/SpecialMatrices.jl.git
INFO: Installing SpecialMatrices v0.1.2
INFO: REQUIRE updated.
ERROR: no method Diagonal{T}(Float64,)
 in strang at /home/idunning/pkgtest/.julia/v0.2/SpecialMatrices/src/strang.jl:7
 in * at /home/idunning/pkgtest/.julia/v0.2/SpecialMatrices/src/strang.jl:15
 in include at boot.jl:238
at /home/idunning/pkgtest/.julia/v0.2/SpecialMatrices/test/strang.jl:6
at /home/idunning/pkgtest/.julia/v0.2/SpecialMatrices/test/runtests.jl:6
INFO: REQUIRE updated.

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.