JuliaMath / JuliaMath/RandomMatrices.jl

support StaticArrays

未关闭
#64 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Julia
星标
94
派生
41
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先定位 RandomMatrices.jl 中的各种 rand(...) 函数,并检查它们目前如何接受整数维度。检查 SMatrix 参数和 Val{n} 参数如何适配现有 API,然后验证是否可以在不产生所述内存分配和性能成本的情况下返回小型 Haar 分布酉矩阵。

由索引模型根据 Issue 内容生成。

评估

技术栈
julia
领域
performance
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。