Wolfram Library Archive


Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings
Title Downloads

Mathematica Idioms for Array Processing
Author

Mark Reeve
Organization: XonTech Inc.
Conference

1998 WorldWide Mathematica Conference
Conference location

Chicago, IL
Description

This tutorial introduces useful Mathematica idioms and utilities primarily for numeric array processing. When treated in the serial, looping manner of traditional programming languages, Mathematica can appear slow and cumbersome; however, elegant and speedy performance can be recovered by using a holistic, parallel, array-based approach. Whereas some Mathematica texts discuss the application of the basic operators to one- or perhaps two-dimensional problems, very often a problem will demand three, four, five, or higher dimensions, leaving the would-be solver floundering in unfamiliar territory and perhaps ultimately resorting to awkward looping constructs. Mathematica's operator set is shown to be fully scalable to higher dimensions in a straightforward way. The goal is to catalyze the formation of a "matrix mindset" in the Mathematica practitioner, enabling the practitioner to decompose a problem into its natural fundamental constituents, and then to swiftly and confidently dispose of each in a few elegant, easily debugged lines of code.

The tutorial will first lightly cover the basics: Map, Apply, MapThread, generalized Transpose, etc. It will then introduce some useful idioms by posing a few problems, breaking each into sections, and solving each section with an idiom. The specific functionality addressed will include: idioms for concatenating multidimensional arrays along various dimensions, reducing values from arrays along specific dimensions, robust and efficient ways of replacing nonconformable chunks of arrays, optimum numeric Boolean operators, masking and treating only elements satisfying a mask along the lines of Fortran's WHERE utility, and others as time permits. Wherever possible, a packed array implementation will be contrasted with the traditional approach.
Subjects

*Mathematica Technology > Kernel > Data Structures
*Mathematica Technology > Programming
Keywords

manipulation of higher dimensional arrays
URL

http://library.wolfram.com/conferences/conference98/abstracts/mathematica_idioms.html
Downloads

Download
Reeve.sit (37.4 KB) - Macintosh
Download
Reeve.zip (34.8 KB) - PC/Unix