> The case for a prospective inverse for g is stronger
> if there is a convincing example of its use in h&.g .
The first one that pops into my head is something like:
Given a polynomial and an element in its range (i.e. the y-value of a point on
its graph), find the corresponding x-value (by inverting the polynomial),
perform some transform on it (say, move to the right), and see where this new
x-value lands you on the graph (by applying the polynomial).
f =: (7?.100)&p. NB. Some random polynomial
g =: f^:_1
h =: >:&.g NB. Given a point on the plot, find its
neighbor
^
| h
| f * *
| * | *
| *| | *
|* | | *
+---+-+-------->
g-'
But I'm sure this example has many flaws. I will try to think of a better one.
Speaking of graphs, here's a neat one:
plot 2-([: [EMAIL PROTECTED] ] ^.~ >:@[EMAIL PROTECTED]:)&>
0-.~i:5000 [ require 'plot'
(I came across it while trying to find a way to extract the constant 2 implied
in monad #: , similiar to the way (|. pI #.) extracts the constant 2
implied in monad #. ).
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm