Subject: interface for numerical integration, roots etc
From: Barton Willis
Date: Tue, 25 May 2010 18:46:46 -0500
-----maxima-bounces at math.utexas.edu wrote: -----
>One?of?the?main?issues?is?how?to?pass?options?(these?functions
>take?many?options).?It?would?be?nice?to?have?a?uniform,?flexible
>system.?For?instance?in?perl,?{}?constructs?an?anonymous?hash,
>which?can?be?used?to?pass?options
>??foo(?x,y,x,?{?OPT1?=>?1,?OPT2?=>?"cat"?})
Consider using the Maxima function assoc along with a list argument. Then
you should be able to do things like
nintegerate(blob, x, 0, 1, method = 'trapezodial, number_panels = 42, ...)
The final optional arguments can be in any order.
It's not in Maxima, but I sometimes (for classes) use "->" as an infix operator
for defining a lambda form: x -> x^2. I suppose I'd prefer
OPT = 1, OPT2 = "cat" over OPT1 => 1, OPT2 => "cat".
--Barton