locally changing Options
- To: mathgroup at smc.vnet.net
- Subject: [mg108224] locally changing Options
- From: hemmecke <hemmecke at gmail.com>
- Date: Thu, 11 Mar 2010 06:34:55 -0500 (EST)
In a function I'd like to temporarily say
foo[x_]:=Module[{...},
...
SetOptions[RowReduce, Method->OneStepRowReduction];
...
]
without affecting the global setting for RowReduce when I call foo.
My experiments wrapping the SetOptions with a Block structure were not
fruitful so far.
The only thing I can think of is something of the form
method = Options[RowReduce, Method];
SetOptions[RowReduce, Method->OneStepRowReduction];
... do something ...
SetOptions[RowReduce,method]
But that looks ugly.
Any suggestions with built-in Mathematica features to achieve this kind of
locality.
Ralf
- Follow-Ups:
- Re: locally changing Options
- From: Leonid Shifrin <lshifr@gmail.com>
- Re: locally changing Options
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: locally changing Options