Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!mach1!torn!nott!uotcsi2!news
From: cbbrowne@csi.uottawa.ca (Christopher Browne)
Subject: Triadic Operators in J?
Message-ID: <1993Apr12.212007.6986@csi.uottawa.ca>
Sender: news@csi.uottawa.ca
Nntp-Posting-Host: prgv
Organization: Dept. of Computer Science, University of Ottawa
Date: Mon, 12 Apr 93 21:20:07 GMT


I've got some Linear Programming code I'm trying to get running in J,
and have hit a bit of a stumbling block.

I've got an operation that intrinsically involves THREE values:
(I'll give them names just so they're not completely anonymous)
  Linear cost function:  c
  Constraint matrix:     A
  Old estimate:          x

The idea is to find the minimum value of c x such that Ax = b.  (At
this point, the fact that there's another vector b is irrelevant.
Ignore it.)

I'm trying to build up a function that manipulates A, x AND c.  The
sub-pieces aren't any problem; I have a function Px that works fine in
the form:

Pnull =. A Px x

The problem is that I really don't want that result; I actually want

cp =. (A Px x) +/ . * c

I'd really like to make up this as a function cp, but it would be a
triadic function, which appears rather non-kosher.

What would people suggest?  Is this the point at which boxed arguments
start rearing their heads?  Or should I forget about the idea of
letting cp be a true "function"?

-- 
Christopher Browne                |     PGP 2.0 key available
cbbrowne@csi.uottawa.ca           |======================================
University of Ottawa              | Genius may have its limitations, but
Master of System Science Program  | stupidity is not thus handicapped.
