JuliaMath / JuliaMath/RandomMatrices.jl

support StaticArrays

Aperta
#64 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
94
Fork
41
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

It would be nice if the various `rand(...)` functions supported returning an `SMatrix`, for example if `::Val{n}` is passed instead of `n::Integer`.

This improves performance and reduces memory allocations in cases where lots of small matrices need to be sampled. e.g. see [this example from discourse](https://discourse.julialang.org/t/code-speed-decreases-when-loop-number-increases/78920) which generates lots of 2x2 and 4x4 Haar-distributed unitary matrices.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.