|
Re: bug in imshow with all negative values: msg#00004gnu.octave.bugs
Here's the new patch. I added the function __im_numeric_limits to imshow.m. This can be replaced with 'numeric_limits' once it is done. I only made use of the 'max' attribute. Regards Stefan On Thu, Mar 31, 2005 at 11:07:08AM -0500, John W. Eaton wrote: > On 31-Mar-2005, Stefan van der Walt <stefan@xxxxxxxxx> wrote: > > | I have taken out the depth guessing in my latest patch to imshow. > | > | John, are you comfortable with the latest version of the patch? > | Should I implement a function similar to "classmax" in bitfcns.cc? > > Sorry for the delay. > > Yes, the patch to imshow looks OK to me. But rather than introducing > a function that can only return the max value, how about something > like this: > > s = numeric_limits (class (pi)) > > => s.epsilon = 2.2204e-16 > s.is_exact = false > s.is_integer = false > s.is_signed = true > s.min = 2.2251e-308 > s.max = 1.7977e+308 > > s = numeric_limits (class (uint8 (1))) > > => s.epsilon = 0 > s.is_exact = true > s.is_integer = true > s.is_signed = false > s.min = 0 > s.max = 255 > > and perhaps include all the fields that are available in the C++ > numeric_limits class defined in the <limits> header? > > This function would return an error if given a class that was not a > numeric type. > > It should be implemented in the octave_value class hierarchy (I could > do this part; for now you could just write a .m file fucntion that > used a switch statement for the common class names and that returned > the info you are interested in). > > Comments? > > jwe
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Assignment to subarray of ND array fails: 00004, John W. Eaton |
|---|---|
| Next by Date: | function cumsum aborts octave: 00004, Jiří Poláček |
| Previous by Thread: | Re: bug in imshow with all negative valuesi: 00004, Stefan van der Walt |
| Next by Thread: | Re: bug in imshow with all negative values: 00004, John W. Eaton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |