[system] / trunk / pg / lib / Value.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2622 Revision 2624
21 # 21 #
22 # For vectors: 22 # For vectors:
23 # 23 #
24 ijk => 0, # print vectors as <...> 24 ijk => 0, # print vectors as <...>
25 # 25 #
26 # word to use for infinity
27 #
28 infiniteWord => 'infinity',
29 #
26 # For fuzzy reals: 30 # For fuzzy reals:
27 # 31 #
28 useFuzzyReals => 1, 32 useFuzzyReals => 1,
29 tolerance => 1E-6, 33 tolerance => 1E-4,
30 tolType => 'relative', 34 tolType => 'relative',
31 zeroLevel => 1E-14, 35 zeroLevel => 1E-14,
32 zeroLevelTol => 1E-12, 36 zeroLevelTol => 1E-12,
33 #
34 # word to use for infinity
35 #
36 infiniteWord => 'infinity',
37 # 37 #
38 # For functions 38 # For functions
39 # 39 #
40 limits => [-2,2], 40 limits => [-2,2],
41 num_points => 5, 41 num_points => 5,
126 126
127# 127#
128# Get a printable version of the class of an object 128# Get a printable version of the class of an object
129# 129#
130sub showClass { 130sub showClass {
131 my $value = makeValue(shift); my $showFormula = shift; 131 my $value = makeValue(shift);
132 return "'".$value."'" unless Value::isValue($value); 132 return "'".$value."'" unless Value::isValue($value);
133 my $class = class($value); 133 my $class = class($value);
134 return showType($value) if ($class eq 'List'); 134 return showType($value) if ($class eq 'List');
135 $class .= ' Number' if $class =~ m/^(Real|Complex)$/; 135 $class .= ' Number' if $class =~ m/^(Real|Complex)$/;
136 $class .= ' of Intervals' if $class eq 'Union'; 136 $class .= ' of Intervals' if $class eq 'Union';
137 $class = 'Word' if $class eq 'String'; 137 $class = 'Word' if $class eq 'String';
138 return ($showFormula ? 'a Formula that returns ' : '') . showType($value->{tree}) 138 return 'a Formula that returns '.showType($value->{tree}) if ($class eq 'Formula');
139 if ($class eq 'Formula');
140 return 'an '.$class if $class =~ m/^[aeio]/i; 139 return 'an '.$class if $class =~ m/^[aeio]/i;
141 return 'a '.$class; 140 return 'a '.$class;
142} 141}
143 142
144# 143#

Legend:
Removed from v.2622  
changed lines
  Added in v.2624

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9