[system] / trunk / pg / lib / Parser / BOP / union.pm Repository:
ViewVC logotype

Log of /trunk/pg/lib/Parser/BOP/union.pm

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 5130 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 9 12:45:06 2007 UTC (12 years, 7 months ago) by dpvc
File length: 1831 byte(s)
Diff to previous 5001
Added new flags to error checking of operands and function arguments.
This is so that a context can be developed that is more forgiving
about what can be put next to what.  Such a context can NOT be used
for evaluation or answer checking, but can be used to generate TeX
output in more sophisticated situations.

Revision 5001 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 12 04:05:56 2007 UTC (12 years, 8 months ago) by dpvc
File length: 1716 byte(s)
Diff to previous 4996
More fixes for creating items in the corret context.  Also added a
method for looking up the package associated with a particular Parser
class (for consistency with the Value->Package call).

Revision 4996 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 10 11:34:27 2007 UTC (12 years, 8 months ago) by dpvc
File length: 1758 byte(s)
Diff to previous 4994
Allow promote() to accept a context as the first argument so that the
promoted object can be forced into the given context.

Revision 4994 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 10 01:17:29 2007 UTC (12 years, 8 months ago) by dpvc
File length: 1770 byte(s)
Diff to previous 3523
Update to handle the fact that the Value package now includes the
context with all MathObjects.  (This may still need some work.)

Revision 3523 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 13 22:38:39 2005 UTC (14 years, 6 months ago) by dpvc
File length: 1698 byte(s)
Diff to previous 3477
Added canBeInUnion and isSetOfReals methods to the Parser package
(similar to the ones in the Value package), replacing the
canBeInterval flag and other ad hoc checks.

Removed ability to form interval like [a] now that we have sets.

Revision 3477 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 11 20:57:18 2005 UTC (14 years, 6 months ago) by dpvc
File length: 1706 byte(s)
Diff to previous 3473
Added ability to subtract intervals, sets and unions.  Adjusted the
precedence of the union 'U' to be above _ and + so that things like
(1,5) U (7,10) - {8} U (2,3) will do ((1,5) U (7,10)) - ({8} U (2,3))
rather than the previous (1,5) U ((7,10) - {8}) U (2,3).  Finally,
added a constant 'R' to the Interval context that is equivalent to
(-inf,inf), so you can do things like R-{0} now.

Still need to work out reducing unions so that things like (1,3)U(2,4)
can become (1,4).

Revision 3473 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 11 14:34:24 2005 UTC (14 years, 6 months ago) by dpvc
File length: 1710 byte(s)
Diff to previous 3370
Changes needt for Set object, and fixed a bug with unions containing
constant intervals with non-constant ones.

Revision 3370 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 12 22:29:53 2005 UTC (14 years, 7 months ago) by dpvc
File length: 1571 byte(s)
Diff to previous 3352
A first pass at making parser error messages localizable.  The
Context()->{error}{msg} hash can be used to specify translations of
the standard messages.  For example,

    Context()->{error}{msg}{'Division by zero'} = "Don't divide by zero, dude!";
    Context()->{error}{msg}{'Function '%s' has too many inputs'} =
        "You passed too many arguments to '%s'";

(I didn't translate into another language, here, but you could do
that, too.)

The msg hash could also be used within answer checkers to make certain
answer messages more appropriate for the given type of expected answer.

Revision 3352 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 5 01:38:19 2005 UTC (14 years, 7 months ago) by dpvc
File length: 1568 byte(s)
Diff to previous 2625
Modified the perl() method to make calles to Value:: directly rather
than to the main:: stubs for creating Value objects.  This will make
it work better from within packages or when Parser.pl hasn't been
loaded.

A few things still won't work in this case; e.g., calls to Closed()
for intervals (these could be handled better using ->with()) and to
functions like Factorial and log10 that are defined in Parser.pl.

Finally, there should be better object-based control over what
routines are called to create these objects, so that subclasses of the
Value objects will be able to be generated correctly.

Revision 2625 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 16 18:35:12 2004 UTC (15 years, 6 months ago) by dpvc
File length: 1557 byte(s)
Diff to previous 2594
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 2594 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 12 20:17:18 2004 UTC (15 years, 6 months ago) by dpvc
File length: 1219 byte(s)
Diff to previous 2558
Fixes for handling intervals better.  In particular, deal better with
ambiguous situations, like (1,2) that could be a point.

You can use [a,a] to specify the single point a.  I'd like to make {a}
represent this (and maybe even {a,b,c} to form finite sets), but this
would interfere with the use of { and } as alternative parentheses.
(Does anyone really use these?)

Do we need a cross product for intervals (and sets) as a means of
representing regions in R^2 (or higher)?

Revision 2558 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed Jul 28 20:32:33 2004 UTC (15 years, 6 months ago) by sh002i
File length: 1409 byte(s)
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.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9