Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: List of Variables and manipulating them ...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47094] Re: List of Variables and manipulating them ...
  • From: Detlef Mueller <dmueller at mathematik.uni-kassel.de>
  • Date: Thu, 25 Mar 2004 05:48:26 -0500 (EST)
  • References: <c3bfq7$7l7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Wolf, Hartmut" wrote:
> 
...
> >During a Session, a User can create some Variables, wich are
> >all of the Form
> >
> >x = MyType[L_list, S_anything].
> >
> >say
> >
> >x=MyType[{1,2,5,6},Y],
> >y=MyType[{1,2,4,9},R],
> >A99=MyType[{1,2,99},PI]
> >...
> >and so on.
> >
> >Now I want to perform the following:
> >
> >Take All Variables wich look like
> >MyType[L, S] and replace L by some Function
> >of L, for example Sort L descending instead
> >of ascending.
> >
> >For the given Example, after calling
> >
> >ChangeAllMyTypeOrders[]
> >
> >the Variables should changed and have the
> >Values
> >
> >x=MyType[{6,5,2,1},Y],
> >y=MyType[{9,4,2,1},R],
> >A99=MyType[{99,2,1},S]
> >...
...

> 
> I'm not too sure in this, to me it appears as you were changing a type. The
> basic question seems to be if you'll like that, e.g. if the girl you
> married, suddenly changed here type, or your bank, imagine!
> 

Of course this is violating an meaningful principle.

The Problem is, that in my Package to Objects can be 
multiplied, and this multiplication is somewhat 
expensive.

So I use the remember-method, defining
Product[x,z]:=(Product[x,y]=Module[...]).

Now changing the order doesn't change the Product
z in z=x*z, but only the order of the summands 
in z. (For some reason it is advantagous to arrange
the Summands in ordered Form.)

Even if I say now, after changing the order, the user
has to explicitely change every Variable, or even 
recalculate everything from scratch, Mathematica would
remember the wrong Values. 

Aside from this, the user shall not mess around with 
the interna of this structure (for this there are interfaces
like LeadingTerm[x]).

This ist the Background for my adventuresome request.

Maybe I find some other Way out of this dilemma.

> One idea to pursue your program [...] 

Thank you very much. 

greetings
  Detlef


  • Prev by Date: Re: Manipulating the Front End
  • Next by Date: why the overflow problems when using assigned values a,b,c vs. actual numbers?
  • Previous by thread: RE: List of Variables and manipulating them ...
  • Next by thread: How to get non-printing heads?