Post Reply 
Programming challenges: processing vectors and matrices
02-14-2019, 07:00 PM
Post: #6
RE: Programming challenges: processing vectors and matrices
One problem (on the HP50g at least) with "arrays" is that these are limited to one and two dimensions. They cannot contain binary integers (why aren't binary integers treated as ordinary integers?).

In "theory" arrays are much faster than lists especially in more than one dimension. Arrays come with some structure. For example, each dimension has the same length. In two dimensions, each column vector (subarray) is independent of the others; same for rows; all columns are dependent on all rows and vice versa. This feature allows parallel operation on arrays or on scalar processors, one need not check for as many dependences. An array should not be treated as a list of lists.

One can march down any dimension of an array using constant increments; this need not be the case for lists.

Matrices are two-dimensional arrays with additional structure; addition, subtraction, multiplication and sometimes inverse (thus division) are defined.

Indices in arrays are dummy. In Fortran, upper and lower indices can be any numbers with lower <= upper.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming challenges: processing vectors and matrices - ttw - 02-14-2019 07:00 PM



User(s) browsing this thread: 2 Guest(s)