octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60141] feature request: colon method for clas


From: Ernst Reissner
Subject: [Octave-bug-tracker] [bug #60141] feature request: colon method for classes of numbers
Date: Sun, 28 Feb 2021 07:38:06 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?60141>

                 Summary: feature request: colon method for classes of numbers
                 Project: GNU Octave
            Submitted by: ernstreissner
            Submitted on: Sun 28 Feb 2021 12:38:04 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: Reissner
        Originator Email: 
             Open/Closed: Open
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

I am developing an arithmetics replacing the internal one provided by octave,
something like interval. 
To that end i define a class `pn`. 
Now i want to use the colon operator with my numbers. 
Strange enough, error: `colon method not defined for pn class`. 
I wonder why. 
Essentially the class has all the colon operator, 
or the range type returned needs to work: 
a means to increment by an amount (plus function) 
and a comparison le function. 

I wonder whether this is possible in matlab. 
If so it would not be a feature request but matlab compatibility issue. 

I dont know what is best: whether you provide a more generic colon function 
or you provide a way to overwrite in an appropriate way. 
But nowhere i found documentation on details. 
even not for matlab. 

For me as a java programmer it looks pretty like an Iterator 
which has functions bool hasnext(.) and pn next(). 





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60141>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]