JuliaLinearAlgebra / MatrixDepot.jl

An Extensible Test Matrix Collection for Julia
http://matrixdepotjl.readthedocs.org/
Other
75 stars 22 forks source link

Obtaining all positive definite matrices from UFL? #36

Closed dpo closed 3 years ago

dpo commented 5 years ago

Is there a way to ask MatrixDepot to fetch all symmetric positive definite matrices from the UFL collection? I searched and never found a way, so I obtained a list of the names of those 216 matrices using #29 and downloaded them with the matrixdepot command. But now

julia> mdlist(:posdef)
14-element Array{String,1}:
 ...

only ever gives a list of 14 matrices. Does it not know about the other ones? I must be misunderstanding what groups are for.

Thanks.

KlausC commented 5 years ago

The list :posdef contains only the builtin samples. You can obtain a list of all symmetric matrices in UFL by: mdlist(issymmetric & sp(:)) Unfortunately there is no isposdef, because this kind of information is not contained in the published matrix data in general. You could use the keyword predicate to see, if the authors mentioned the words "pos..." or "def..."

mdlist((issymmetric | ishermitian) & keyword("pos[[:alpha:]]*" | "def[[:alpha:]]*"))

KlausC commented 3 years ago

resolved with version v1.0 You can do now:

julia> mdlist(isposdef)
250-element Array{String,1}:
 "ACUSIM/Pres_Poisson"
 "AMD/G2_circuit"
 "AMD/G3_circuit"
...

to obtain the list of all matrices of SuiteSparse and locally defined, which are positive definite.