|Links to HEAD:||(view) (download) (as text) (annotate)|
Update the overloaded operators so that they can be overridden by subclasses of the predefined object classes. This involves calling the objects method rather than using a hard reference to the routine in the parent class. Also, change the name of the string comparison routine to compare_string to avoid conflicts with cmp that is used to produce the answer checker for the class. Finally, in Value.pm, promotePrecedence no longer has to do fancy footwork to get "special" precedence to work (this was a hack to get around the misfeature of the overloaded operators -- now that that is being handled correctly, there is no need for it).
Improved the Real(), Complex(), Point(), Vector(), Matrix() and String() constructors so that they will process formulas passed to them as strings rather than requiring perl objects for these. For example, you can use Real("2/3") rather than Real(2/3) if you want. Also, Real("1+x") will return a formula returning a real (essentially the same as Formula("1+x") in this case).
Fixed an error with Matrix() that could cause it to loop infinitely when bad data is passed to it. Also, allow Matrix(), Point(), Vector(), and Real() to accept string values that are evaluated to produce the value returned. (Sorry, accidentally committed with a blank message.)
*** empty log message ***
Fixed index problem with matrix multiplciation. (It was returning the transpose!)
Added isZero and isOne checks for Parser::Value objects (i.e., for constants within formulas). These now correctly handle vector and matrices, in particular. The isOne and isZero checks are used in the reduce() method to simplify formulas.
Fixed some inconsistencies between handing of matrices within the parser and Value packages. Added a predefined Matrix context.
Fixed TeX output of Matrices to use \array rather than \matrix for matrices with formulas as entries (this had already been fixed for constant matrices). Made intervals produce formulas when of of the endpoints is a formula. Removed unneeded comment.
Added string comparison to all Value object classes (to compare the string value of an object to another string). Overloaded perl '.' operator to do dot product when the operands are formulas returning vectors. (Part of the auto-generation of formulas). A few improvements to real and complex class output results. Made Union class slightly more robust and removed need for makeUnion method other than in the Union itself.
*** empty log message ***
Fixed some bugs in the handle of the context in ->string and ->TeX methods of Value objects.
Can now specify that the objects stringify themselfs in their TeX forms rather than their answer-string forms. This makes it easier to use the objects in the text of a problem (without having to call ->TeX explicitly each reference). Use Context()->texStrings to start outputting TeX strings, and Context()->normalStrings to switch back.
Added an Infinite object class for the Value package. Still need to add it to the Parser package.
A number of small fixes. Most were to fix minor bugs in string and TeX output, particulary for the various list-based objects (like vectors, intervals, etc.). There were also some bug fixes in the comparison routines. Some additional checks were added for valid intervals when the coordinates are formulas.
Significant update to new parser. New features include: Better control over format of vector output (you can now specify ijk-format rather than <...> format) "Fuzzy" reals, where the relations like == return true when the two values are "close enough". (This is controlable using parameters similar to those used in NUM_CMP). The fuzzy reals are now used in vectors/points/matrices/complexes/intervals and so on so that their relations will also be fuzzy. E.g., (1E-13,2) == (0,3) will be true, and norm(Vector(0,1E-13)) will equal 0. The two main portions of the parser (the Parser and Value packages) now share a common context object for configuration purposes.
merged changes from rel-2-1-a1 -- stop using that branch.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
|aubreyja at gmail dot com||ViewVC Help|
|Powered by ViewVC 1.0.9|