Re: Re: locally changing Options
- To: mathgroup at smc.vnet.net
- Subject: [mg108310] Re: [mg108282] Re: locally changing Options
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Sat, 13 Mar 2010 07:57:16 -0500 (EST)
- References: <hnakgk$5oa$1@smc.vnet.net> <201003121212.HAA13786@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
Nice. That seems far simpler than the other solutions offered.
Bobby
On Fri, 12 Mar 2010 06:12:37 -0600, Raffy <adraffy at gmail.com> wrote:
> On Mar 11, 3:34 am, hemmecke <hemme... at gmail.com> wrote:
>> 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
>> o=
> f
>> locality.
>>
>> Ralf
>
> Block[
> {RowReduce = RowReduce[#1, Method -> "OneStepRowReduction", ##2] &},
> (* your code here *)
> ]
>
--
DrMajorBob at yahoo.com
- References:
- Re: locally changing Options
- From: Raffy <adraffy@gmail.com>
- Re: locally changing Options