Question: operations on fields of records

Hi; I am working on a package where the data mostly come in Maple records with a varisble number of fields with different names. At least one field in each record has a 6 by 6 matrix, the expressions of which involve the values associated with at least some of the other fields.

Occasionally I have the need to, say, apply a function to each of these fields. E.g., I want to substitute a value for a specific name; this name may show up in several fields and also will show up in the matrix.

So I am wondering what is the best way to do this. I think one way to do this is by overloading the subs function and writing my own subs routine to be invoked on variables of certain kinds which are my records). There are details to be resolved But I wonder whether there is a more standard way to do this; akin to map when lists are involved (but map does not work over fields of a Maple record).

Any thoughts anyone?

Mac Dude

Please Wait...