MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Confused by levels in Outer

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44090] Confused by levels in Outer
  • From: "Ken Morgan" <kemorgan at vt.edu>
  • Date: Wed, 22 Oct 2003 03:24:47 -0400 (EDT)
  • Organization: Virginia Tech, Blacksburg, Virginia, USA
  • Sender: owner-wri-mathgroup at wolfram.com

This makes sense:
Outer[f, {a}, {{a, b}, {b, c}}, 1, 1]
    {{f[a, {a, b}], f[a, {b, c}]}}

This makes sense:
Outer[f, {a}, {{a, b}, {b, c}}, 1, 2]
    {{{f[a, a], f[a, b]}, {f[a, b], f[a, c]}}}

This makes sense:
Outer[f, {a}, {{{a, b}, {b, c}}}, 1, 1]
    {{f[a, {{a, b}, {b, c}}]}}

But this doesn't make sense:
Outer[f, {a}, {{{a, b}, {b, c}}}, 1, 2]
    {{{{f[a, a], f[a, b]}, {f[a, b], f[a, c]}}}}

The last one gives the result I'd expect from Outer[f, {a}, {{{a, b}, {b,
c}}}, 1, 3].
It seems like it should give {{{f[a, {a, b}], f[a, {b, c}]}}}.
Why doesn't it treat {a, b} and {b, c} as atomic elements?

Thanks,
Ken



  • Prev by Date: Antw: pdf-export
  • Next by Date: InterpolatingFunctionAnatomy
  • Previous by thread: Re: Antw: pdf-export
  • Next by thread: Re: Confused by levels in Outer