[system] Repository:
ViewVC logotype

Revision 3677

Jump to revision: Previous Next
Author: dpvc
Date: Sat Oct 1 01:10:27 2005 UTC (14 years, 1 month ago)
Log Message:
Allow context to override object class used to create formula objects
(so that things like ImplicitPlane can create instances of themselves
automatically when needed).

This mechanism needs to be enlarged to encompass the other Value
object classes as well (like the Context()->{parser}{...} hash).

The real problem is that the List object probably shouldn't create a
formula returning a list when it is passed formulas, since there
really isn't much need for a formula returning a list to be
autogenerated (you can create one by hand using Formula if needed).

Right now, ALL the Value objects make themselves into Formulas when
one of their entries is a formula.  For example, Point(1,"x") produces
the same thing as Formula("(1,x)"), and List(1,"x") is the same as
Formula("1,x").  This is good for points, but not so good for lists.
And it might sometimes be nice to have a Vector of Formulas, or a
Matrix with Formula entries (rather than Formulas returning Vectors or
Matrices).  But this would require some serious changes internally in
the Value objects, which make assumptions about their values being
constant.  Changing that will be for another day...

Changed paths:

Path Details
Directorytrunk/pg/lib/Value/Context.pm modified , text changed
Directorytrunk/pg/lib/Value/Formula.pm modified , text changed

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9