Newsgroups: comp.lang.apl
From: ibe@world.std.com (ira b ekhaus)
Subject: Data  set manipulation:  g(x,y,w,z )= f(x,y,z)+h(w,x,z); easiest (most elegant) way ?
Message-ID: <CowKGB.3x5@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 27 Apr 1994 05:26:35 GMT
Lines: 27

Hi,

I'm presently working with some data sets (assume no functional
description), just one dimension in an array per independent variable.
say I have 2 data sets f(x,y,z) and h(w,x,z) which could if summed properly
generate
   g(x,y,w,z )= f(x,y,z)+h(w,x,z)

I'm successfully doing this on a per case basis by tranposing the axis
of f,h or both and then cranking g aroun do have whatever order in the
array dimensions I feel "most" comfortable with.

Has anyone consider a more elegant way to do this?
perhaps a table
that maps output index to internal array indices.

	g       f	h

dim	0       1  	1
	1	2
	2		0
	3	3	2

I'd appreciate any thoughts on performance, reusability
and clarity .
thanks,
ira

