Skip to main content
remove debug line
Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]
   ];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> Directive[Thickness[.005], 
   Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

Update Response to comment below. I made new version called getList2 which only shows up the options with Method on them. I am sure this could be written better, but I am not good with patterns. Here we go

getList2[name_String] := Module[{options, idx,z1,z2},
   options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = Flatten[Last@Reap@Do[z1 = Options[options[[i]]];
         If[debug, Print["\n\n*************z1=\n", z1]]; 
        If[z1 != {},
         z2 = Cases[z1, Rule["Method", x_] :> Method -> x];
         If[Length[z2] != 0 , Sow[{options[[i]], z2}]]
         ],
        {i, Length[options]}
        ], 1];
   (* rest for formatting*)
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]];

Example calls

r = getList2["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

r = getList2["NDSolve"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]
   ];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> Directive[Thickness[.005], 
   Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

Update Response to comment below. I made new version called getList2 which only shows up the options with Method on them. I am sure this could be written better, but I am not good with patterns. Here we go

getList2[name_String] := Module[{options, idx,z1,z2},
   options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = Flatten[Last@Reap@Do[z1 = Options[options[[i]]];
         If[debug, Print["\n\n*************z1=\n", z1]];
        If[z1 != {},
         z2 = Cases[z1, Rule["Method", x_] :> Method -> x];
         If[Length[z2] != 0 , Sow[{options[[i]], z2}]]
         ],
        {i, Length[options]}
        ], 1];
   (* rest for formatting*)
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]];

Example calls

r = getList2["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

r = getList2["NDSolve"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]
   ];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> Directive[Thickness[.005], 
   Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

Update Response to comment below. I made new version called getList2 which only shows up the options with Method on them. I am sure this could be written better, but I am not good with patterns. Here we go

getList2[name_String] := Module[{options, idx,z1,z2},
   options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = Flatten[Last@Reap@Do[z1 = Options[options[[i]]];           
        If[z1 != {},
         z2 = Cases[z1, Rule["Method", x_] :> Method -> x];
         If[Length[z2] != 0 , Sow[{options[[i]], z2}]]
         ],
        {i, Length[options]}
        ], 1];
   (* rest for formatting*)
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]];

Example calls

r = getList2["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

r = getList2["NDSolve"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

added filter to pick methods
Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]
   ];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> Directive[Thickness[.005], 
   Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

Update Response to comment below. I made new version called getList2 which only shows up the options with Method on them. I am sure this could be written better, but I am not good with patterns. Here we go

getList2[name_String] := Module[{options, idx,z1,z2},
   options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = Flatten[Last@Reap@Do[z1 = Options[options[[i]]];
        If[debug, Print["\n\n*************z1=\n", z1]];
        If[z1 != {},
         z2 = Cases[z1, Rule["Method", x_] :> Method -> x];
         If[Length[z2] != 0 , Sow[{options[[i]], z2}]]
         ],
        {i, Length[options]}
        ], 1];
   (* rest for formatting*)
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]];

Example calls

r = getList2["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

r = getList2["NDSolve"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]
   ];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> Directive[Thickness[.005], 
   Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]
   ];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> Directive[Thickness[.005], 
   Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

Update Response to comment below. I made new version called getList2 which only shows up the options with Method on them. I am sure this could be written better, but I am not good with patterns. Here we go

getList2[name_String] := Module[{options, idx,z1,z2},
   options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = Flatten[Last@Reap@Do[z1 = Options[options[[i]]];
        If[debug, Print["\n\n*************z1=\n", z1]];
        If[z1 != {},
         z2 = Cases[z1, Rule["Method", x_] :> Method -> x];
         If[Length[z2] != 0 , Sow[{options[[i]], z2}]]
         ],
        {i, Length[options]}
        ], 1];
   (* rest for formatting*)
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]];

Example calls

r = getList2["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

r = getList2["NDSolve"];
Grid[r, Frame -> All, Alignment -> Left]

Mathematica graphics

added 202 characters in body
Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1];1]
   Grid[options];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> 
    Directive[Thickness[.005], Gray]]];

To use:

 getList["NIntegrate"]  Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

I use this function

getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1];
   Grid[options, Frame -> All, Alignment -> Left, FrameStyle -> 
    Directive[Thickness[.005], Gray]]];

To use:

 getList["NIntegrate"]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions.

I use this function

 getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"];
   options = ToExpression /@ options;
   options = {#, Options[#]} & /@ options;
   idx = Range[Length[options]];
   options = {#[[1]], TableForm[#[[2]]]} & /@ options;
   options = Insert[options[[#]], #, 1] & /@ idx;
   options = Insert[options, {"#", "Option", "Options to this option"}, 1]
   ];

To use:

r = getList["NIntegrate"];
Grid[r, Frame -> All, Alignment -> Left, FrameStyle -> Directive[Thickness[.005], 
   Gray]]

Mathematica graphics

I modified the above a bit based on function I think I got from one of the Mathematica Guide books but I do not remember now which book it was. The methods can be seen under the third column there by looking for Method-> there. At least this is much easier than having to scan pages and pages of help looking for these things.

Replace the name of the command above to get other functions. To filter the Method-> part automatically, one possible way would be to use Cases or some pattern on the result r above. This is left as an exercise for the pattern experts out there.

Source Link
Nasser
  • 150.5k
  • 12
  • 161
  • 374
Loading