Here is a model for a "general oblique":

oblq=:1 :0
  assert. (=<.)rnk2=:-:#$y
  s1=: rnk2 {. $y
  s2=: rnk2 }. $y
  inds=: i.<:s1+s2
  sel=: (s1{.inds) +/&, s2 {. inds
  ($inds) $ (~.,sel) /:~ (,sel) u/.,y
)

For example:

h=:".;._2]0 :0
 _8  1 _7 _2 _9  4
  4  5 _5  2  7 _1
 _6 _3 _3 _6  9  5
)

f=:".;._2]0 :0
 _5  2 _2 _6 _7
  9  7 _6  5 _7
  1 _1  9  2 _7
  5  9 _9  2 _5
 _8  5 _2  8  5
)

g=:".;._2]0 :0
  40  _21  53   42  105    1  87   60   39 _28
 _92  _64  19 _167  _71  _47 128 _109   40 _21
  58   85 _93   37  101  _14   5   37  _76 _56
 _90 _135  60 _125   68   53 223    4  _36 _48
  78   16   7 _199  156 _162  29   28 _103 _10
 _62  _89  69  _61   66  193 _61   71   _8 _30
  48   _6  21   _9 _150  _22 _56   32   85  25
)

   g-: f +/oblq@(*/) h
1

This leaves two issues for me:

[1] How do I implement deconvolution?

[2] Should J be changed to support this "more
general" approach to convolution?  If so, what
motivation do we need and what changes would
this imply?

Thanks,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to