JuliaMath / JuliaMath/RandomMatrices.jl

support StaticArrays

Đang mở
#64 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
94
Fork
41
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by locating the various rand(...) functions in RandomMatrices.jl and review how they currently accept integer dimensions. Check how an SMatrix and a Val{n} argument could fit the existing APIs, then verify that small Haar-distributed unitary matrices can be returned without the stated allocation and performance costs.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
julia
Lĩnh vực
performance
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.