Log of /trunk/pg/lib/Value/Matrix.pm
Parent Directory
Revision
3192 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 16 13:30:28 2005 UTC (8 years, 2 months ago) by
dpvc
File length: 11799 byte(s)
Diff to
previous 3171
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).
Revision
3171 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 15 21:53:23 2005 UTC (8 years, 3 months ago) by
dpvc
File length: 11659 byte(s)
Diff to
previous 3166
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).
Revision
3166 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 15 02:20:52 2005 UTC (8 years, 3 months ago) by
dpvc
File length: 11702 byte(s)
Diff to
previous 3165
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.)
Revision
2800 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Sep 19 14:27:39 2004 UTC (8 years, 8 months ago) by
dpvc
File length: 11496 byte(s)
Diff to
previous 2671
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.
Revision
2671 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 22 21:18:06 2004 UTC (8 years, 9 months ago) by
dpvc
File length: 11028 byte(s)
Diff to
previous 2668
Fixed some inconsistencies between handing of matrices within the
parser and Value packages. Added a predefined Matrix context.
Revision
2668 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 22 02:55:38 2004 UTC (8 years, 9 months ago) by
dpvc
File length: 11017 byte(s)
Diff to
previous 2625
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.
Revision
2625 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 16 18:35:12 2004 UTC (8 years, 9 months ago) by
dpvc
File length: 11043 byte(s)
Diff to
previous 2615
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.
Revision
2606 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Aug 14 11:25:47 2004 UTC (8 years, 9 months ago) by
dpvc
File length: 11039 byte(s)
Diff to
previous 2603
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.
Revision
2592 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 12 16:40:47 2004 UTC (8 years, 9 months ago) by
dpvc
File length: 11198 byte(s)
Diff to
previous 2579
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.
Revision
2579 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 9 21:38:01 2004 UTC (8 years, 9 months ago) by
dpvc
File length: 11133 byte(s)
Diff to
previous 2558
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.
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.