GNU Astronomy Utilities  Tasks: task #13867, Infix notation for ImageArithmetic
You are not allowed to post comments on this tracker with your current authentication level.
task #13867: Infix notation for ImageArithmetic
Submitter:  Mohammad Akhlaghi <makhlaghi>  
Submitted:  Tue 26 Jan 2016 06:24:28 AM UTC  
Should Start On:  Mon 25 Jan 2016 03:00:00 PM UTC  Should be Finished on:  Mon 25 Jan 2016 03:00:00 PM UTC 
Category:  Arithmetic  Priority:  5  Normal 
Item Group:  Enhancement  Status:  Postponed 
Privacy:  Public  Assigned to:  None 
Percent Complete:  0%  Open/Closed:  Open 
Effort:  0.00 
Jump to the original submission
Thu 20 Apr 2023 03:41:12 PM UTC, comment #7: 
Mohammad Akhlaghi <makhlaghi> 
Mon 30 Mar 2020 11:32:14 AM UTC, comment #6: As you say, this is a feature of the infix notation, so it doesn't yet exist ;).

Mohammad Akhlaghi <makhlaghi> 
Mon 30 Mar 2020 11:29:05 AM UTC, comment #5: I mean the order in which operations are executed.

Kartik Ohri <lucifer13> 
Mon 30 Mar 2020 11:19:51 AM UTC, comment #4: I don't really understand what you mean by "precedence order of all operators". Please be more elaborate! Did you look at how the reverse polish operation is managed in Arithmetic? Your function should have similar inputs ;). 
Mohammad Akhlaghi <makhlaghi> 
Mon 30 Mar 2020 07:20:31 AM UTC, comment #3: To implement the algorithm, we need a precedence order of all operators. Is there an order already defined or should I define one ? If I have to define one, what things to keep in mind? 
Kartik Ohri <lucifer13> 
Sun 29 Mar 2020 12:45:27 AM UTC, comment #2: If you have the time, that would be great ;)!

Mohammad Akhlaghi <makhlaghi> 
Sat 28 Mar 2020 09:14:55 PM UTC, comment #1: While my copyright forms are being processed and till you are able to review the work on units library, can I work on this ? Also, should I begin with a similar approach first write an independent C file to convert infix notation to postfix and then proceed with integrating it in the library ? 
Kartik Ohri <lucifer13> 
Tue 26 Jan 2016 06:24:28 AM UTC, original submission:
In task #13574 a program to do image arithmetic was created (ImageArithmetic). But to be simply implemented it uses the postfix or reverse polish notation. Therefore as explained in that task, it is important for easy usability that it change the notation to the Infix notation where the operators are placed between the operands and it includes parenthesis. As explained in that task, a good way to do this might be through the Shuntingyard algorithm which translates infix notation to postfix notation which ImageArithmetic currently uses:

Mohammad Akhlaghi <makhlaghi> 
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Powered by Savane 3.138484.
Corresponding source code
During a discussion with Peter Tueben, the GIPSY package came up as a way to implement infix notation. See its implementation in NEMO here: https://github.com/teuben/nemo/blob/master/src/scripts/install_gipsy.csh