如何查看Julia包中的方法列表 [英] How can I see the list of methods in a Julia Package

查看:1532
本文介绍了如何查看Julia包中的方法列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Julia中是否有一个命令列出了包中可用的所有方法?

Is there a command in Julia that lists all the methods that are available in a package?

例如,我加载了发行版

using Distributions

现在,我想看看要调用哪个函数以从正态分布中绘制随机值.有没有从Google进行搜索的好方法,而无需使用Google搜索?

and now I would like to see what function to call to draw a random value from a normal distribution. Is there a good way to do this from inside of Julia without a google search?

推荐答案

排序,尽管我认为它的实用性不高:

Sort of, although I don't think its of much utility:

julia> using Distributions

julia> names(Distributions)
215-element Array{Symbol,1}:
 :median
 :logpdf
 :logpmf!
 :Chisq
 :posterior_rand
 :fit_mle!
 :NegativeBinomial
 :posterior_rand!
 :ContinuousMatrixDistribution
 :ValueSupport
 :InverseGamma
 :complete
 :TDist
 :NormalCanon
 :SufficientStats
 :Chi
 :logpmf
 :logdetcov
 :Gumbel
 :Sampleable
 ...

或非编程方式使用

julia> whos(Distributions)
AbstractMixtureModel          DataType
AbstractMvNormal              DataType
Arcsine                       DataType
Bernoulli                     DataType
Beta                          DataType
BetaPrime                     DataType
Binomial                      DataType

我认为,随着Julia 0.4中内置的文档系统的加入,我们将获得更多包含REPL可用文档的软件包.

I think that with the inclusion of an inbuilt documentation system in Julia 0.4, we'll get way more packages with docs available at the REPL.

这篇关于如何查看Julia包中的方法列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆