3
$\begingroup$

Is there a quick way to search all built-in Mathematica functions by name? Say I want to find all functions whose name contains "Graph", such as GraphPlot, NeighborhoodGraph, Subgraph, and so forth. When I enter "Graph" into Mathematica's documentation system, I get some, but not all of the functions whose names contain "Graph". I also get a lot of names which are not functions, as well as other material of varying relevance.

I just want to search for functions by name or partial name. Also, I don't want to see functions from optional packages -- only the basic ones that load when Mathematica starts up.

$\endgroup$
10
  • $\begingroup$ Try ?*Graph* . $\endgroup$ Jul 30, 2012 at 15:07
  • $\begingroup$ @b.gatessucks - Slow, as it searches half the internet. Also returns more than the built-in functions; the first entry is "cryptographic number theory". $\endgroup$
    – stevenvh
    Jul 30, 2012 at 15:11
  • $\begingroup$ @stevenvh On my system it is very fast and I only get the System` context. $\endgroup$ Jul 30, 2012 at 15:20
  • $\begingroup$ @b.gatessucks - Are we talking about the help window? "graph" finds 714 results in < 1 second, "graph" finds 2192 results in 26(!) seconds. Searching half the internet may be incorrect, but that's the impression you get. The "cryptographic number theory" refers to the Mathematica Guide, but so do some entries in the "graph" search result. $\endgroup$
    – stevenvh
    Jul 30, 2012 at 15:29
  • $\begingroup$ @stevenvh No, you can type the command in a notebook. Thanks for the clarification. $\endgroup$ Jul 30, 2012 at 15:30

2 Answers 2

10
$\begingroup$
Names["*Graph*"]

(*
{"AcyclicGraphQ", 
.....
, "WheelGraph"}
*)

or

Information["*Graph*"]

Mathematica graphics

$\endgroup$
5
$\begingroup$

In the Documentation Center, you can use the wildcard * as well, as in *Graph*. The difference between doing this in documentation or in the notebook interface (by typing ?*Graph*) is:

  • The notebook will give you a concise list of all matching names
  • However, the above list will also contain names that are not built-in but have been defined by the user or in packages. The listings fortunately make it easy to tell which are the built-in definitions: they are under the `System`context.
  • Sometimes you may be interested in finding functions that aren't in the system context but that are still part of Mathematica's standard add-on packages. For example, the Laplacian is in in the vector analysis package which isn't loaded automatically but is part of Mathematica. This won't show up when you type ?Laplacian* while the packages hasn't been loaded.
  • In this case, doing the search Laplacian* in the Documentation Center may be the best way to look up that function.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.