Bill,
> Are we reading the same page? Why do you say there is a single node type?
Sorry, I think I'm with you now.
There are a couple of issues that I would like to make sure I
understand.
I think that the first is, I think, a minor issues. That is I would to
change from a binary tree to a more general tree. At the moment you
have:
MkAdd(X:ExprCat,Y:ExprCat): ExprCat == add
Rep==Record(left:X,right:Y)
presumably? I can instead do:
MkAdd(Subnodes: List ExprCat): ExprCat == add
Rep==Record(children:Subnodes)
The main issue that I'm trying to understand, when I'm talking about
compile-time and run-time, is that MkAdd is mostly statically defined
at compile time, whereas the node types that I have depend on dynamic
parameters only known at run-time.
So in a scenegraph there may be a transform node, this transform node
will modify the position of all its descendants in the hierarchy below
it, the transform value: rotate by 30 degrees, or expand to twice its
size, or shift 2 units to the right or whatever (defined by a
particular matrix, multivector or complex number) is known only at run-
time when the actual tree instance is created, so I need something
like this:
MkTransform(Subnodes: List ExprCat): ExprCat == add
Rep==Record(children:Subnodes,transform:Params)
Then, in the implementation you have:
eval(x:%):Integer == sum explode rep x
You are correct that I don't understand this. (can I explode things in
SPAD?)
What I want to do is something like this:
eval(x:%,currentTransformValue:Matrix DoubleFloat):Matrix DoubleFloat
==
a calculation that takes %.transform combines it with
currentTransformValue and produces newTransformValue
then calls eval on all its subnodes using newTransformValue.
When I was writing the scenegraph stuff I tried many ways to do this
without success (I wish I could remember more details) but one of the
main problems was that % always ended up pointing to ExprCat instead
of MkAdd (which would not compile and would not give the correct
instance if it did).
> > What word would you use for that behaviour?
>
> Nothing special. This is exactly what Axiom does now.
I know that I have been very lax with the terminology so I am very
keen to get a technical term for this that we can all agree on. Then I
can correct the wording in the wiki page and the scenegraph
documentation.
Martin
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.