Rob Donnelly
Rob Donnelly

Reputation: 2326

How can I see the list of methods in a Julia Package

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

For example I load up Distributions

using Distributions

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?

Upvotes: 8

Views: 2884

Answers (1)

IainDunning
IainDunning

Reputation: 11644

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
 ...

or non-programmatically, using

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

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.

Upvotes: 7

Related Questions