[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Infix form
From: |
address@hidden |
Subject: |
Infix form |
Date: |
Sun, 8 Jun 2008 22:25:08 +0200 (CEST) |
Hello
I am searching for a way to define n-variable functions as n-ary operators,
most frequently n=1,2 of course. That is I want to define infix forms of
functions in the case of two variables.
The reason for needing this is that I want to replace expressions of the form
booleanOp(Mtx,Arg).*Mtx
... with the syntax ..
Mtx(booleanOp(Arg(s)))
e.g
(A<2).*A =: A(<2).
Perhaps I should use a functional language as front-end for this kind of
applications but I ask this forum, perhaps improperly: How can I do this best?
Is it recommendable to overload octave source with this functionality or
should I script from a functional language? Is this syntax already implemented
and what number of operations is actually carried out in the example above? It
should really simplify if I could operate directly on the elements by "giving
the matrix" an operator, preumably boolean ( E.g. M( < 2 && > 3 || divisibleBy
2) and so on. ) but perhaps even continous and perhaps even working on
surrounding elements. I yet have no insight in the sources but ask for an early
advice.
Have been looking for an easy way to donate, smaller amounts, to the octave
project. Is there a lower limit at the webform to administer?
Thank you for your time and a lovely programming environment.
/Anders
- Infix form,
address@hidden <=