Page Numbers: Yes X: 527 Y: -.4 First Page: 69 Not-on-first-page Margins: Top: 1.1" Bottom: 1" Binding: 5 Odd Heading: Not-on-first-page y576qj(635) APPENDIX D: SUMMARY LIST OF FUNCTIONSy763qc(0,14848)\1f1 7f0 6f1 6f0 2f1 3f0 1f1 2f0 2f1 Even Heading: Not-on-first-pagey756qj(0,17815) IDL REFERENCE MANUALy763qc\5f1 9f0 1f1 Appendix De18c(635)\f6b Summary list of IDL functionse12c\f6b This appendix lists the functions available in the IDL system, giving their arguments and a brief description of their behavior. The functions are described in the notation used in the body of the manual. The annotation "no-spread" means that the function will accept any number of arguments.e12j\f6 51f1 3f6 adjoin[vector...]e18\f6 No-spread. Produces a new vector formed by joining its arguments together end to end.l4233j\f6 anova[mtable;random;nesting]e12\f6 Produces a matrix containing a summary table for the analysis of variance of moments array mtable. random, if given, specifies the random factors (dimensions of mtable) and is used for constructing appropriate F-tests. nesting is an optional specification of the nesting relations between the independent variables. It is a list of lists, each of the form (nested-factor nesting-factor1 nesting-factor2 ...).l4233j\f6 91b6B3b6f0B56b6B43i1I7f6 1b7B160f1o252 1f0o0 15f1o252 1f0o0 6f6 assign[target;source]e12\f6 The IDL assignment operator. target must be a selection on some array, and that array will be side-effected. The infix operator _ translates to assign if an array selection expression appears as its left-hand operand.l4233j\f6 4f1 3f6 23b6B110i6I at[a;sltr]e12\f6 The IDL selection operator. Produces an array as output which is a window onto the section of a described by sltr. sltr may be a list of length no greater than the number of dimensions of a to specify a selection of a's values, or a label or code selector. The infix operator @ is associated with at.l4233j\f6 4f1 3f6 88b1B14b4B3b4B69b1B27b1B81i2I code[lev;val]e12\f6 Constructs a code selector to be given to at. If lev is NIL, the selector can be used to reference the value-labelled dimension of the array to which it is applied by at. Otherwise, if val is NIL, the selector will reference the complete codebook associated with level lev on the array's value-labelled dimension. If val is a non-NIL literal atom, it will reference the value associated with it on level lev. Finally, if val is a scalar, it will reference the label associated with that value.l4233j\f6 42i2I6b3B4f7 3f6 108i2I17b3B4f7 3f6 74b3B46b3B10f7 3f6 71b3B15b3B copy[x]e12\f6 The Lisp copy function generalized to copy IDL arrays (which may be the value of x or may appear at arbitrary levels in the list-structure x). Assigning into a copy of an array will not affect the original.l4233j\f6 9i4I30f1 3f6 35b1B57b1B21i4I counts[a]e12\f6 A generic function that returns the sum of the elements of a just like rplus, except that it skips over NIL's. Often used in conjunction with group to produce contingency tables from data arrays.l4233j\f6 59b1B11i5I28f7 3f6 36i6f0I2f6 covar[a;wt]e12\f6 Builds the covariation matrix (sums of mean centered cross products) for the columns of matrix a, using wt as a weighting vector. Returns a symmetric matrix, whose last row represents a Constant variable (with value always 1) that has been swept out, so that the last row has the means of the columns of a, and 1/n in the last cell.l4233j\f6 95b1B8b2B81f0 8f6 110b1B6g1G deal[n]e12\f6 Returns a vector containing a random permutation of the integers from 1 to n.l4233j\f6 75b1B dumpidlarray[a;file]e12\f6 Writes a symbolic expression on file (primary output file if file is NIL) from which readidlarray can reconstruct an array equivalent to a. If file is not an open file, it is opened, the expression is printed, and then file is closed.l4233j\f6 32b4B25b4f0B4f1 3f0 2f6 11i12f0I40b1f6B6b4B72b4B eapply[fn;expects;args]e12\f6 Extending form of apply. Applies fn to each section of the decomposition of args according to expects, a list which gives, for each argument of fn, the dimensionality expected of that argument.l4233j\f6 18i5I11b2B41b4B14b7B43b2B eapply*[fn;expects;args...]e12\f6 No-spread. Extending form of apply*. Applies fn to each section of the decomposition of args according to expects.l4233j\f6 30i6I11b2B41b4B14b7B elementtype[a]e12\f6 Returns the type (INTEGER or FLOATING) of the elements of the array a.l4233j\f6 18f7 8f6 2f7 9f6 31b1B ems[nlevels;random;nesting]e12\f6 Produces an expected mean squares coefficient table for an analysis of variance design with factor levels given by nlevels, the factors in random considered random, and the nesting relationships given by nesting. nlevels can be the moments table itself, or just the shape of its classification space.l4233j\f6 115b7B17b6B59b7B3b7B extend[fn;expects]e12\f6 Modifies the function fn so that it will automatically extend across array arguments according to expects.l4233j\f6 22b2B74b7B format[a]e12\f6 Returns the format (either FULL or SYMMETRIC) of array a.l4233j\f6 27f7 4f6 4f7 9f6 11b1B fprob[f;dfnum;dfden]e12\f6 Returns the probability of F-value f, with degrees of freedom dfnum, dfden.l4233j\f6 27i1I7b1B26b5B1b6B genvec[initial;end]e12\f6 Generates a vector of the numbers from initial to end. If initial is a two element vector, it is taken as the first two terms of the series (i.e., it specifies an increment). Thus, (GENVEC '(3 5) 11) generates the odd integers from 3 to 11.l4233j\f6 39b7B4b3B6b7B117f7 18f6 group[attribs;values;dim]e12\f6 Constructs an array of m+n dimensions, where m is the number of columns of the matrix attribs, and n the dimensionality of values. dim indicates which dimension of values is to be nested within the classification induced by attribs. The values in each row of attribs are used as a subscript for an m-dimensional array whose extents are given by the number of distinct values found in the corresponding column of attribs. The output is formed by grouping all dim dimension planes of values corresponding to equal rows of attribs in the m-space location addressed by that row. In effect, group places the dim dimension planes of values within the cells of the classification design represented by attribs. If values is an integer, it is interpreted as a constant vector of that integer with length the number of rows of attribs. If NIL, it is considered to be one, which produces an object from which counts will compute a contingency table.l4233j\f6 86b7B30b6B3b3f0B30f6b6f0B54f6b7f0B3f6 26b7B146b7B40b3B21b6B32b7B60i5I12b3B21b6B62b7B6b6B4f0 10f6 91b7B6f1 4f0 34f6 31i6I hist[v;file]e12\f6 Prints a histogram for v, a vector, to the primary output file, or to file if given. Suppresses multiple identical lines whenever their number exceeds the value of HISTRPTLINES. If file is not an open file, it is opened, the histogram is printed, and then file is closed.l4233j\f6 23b1B46b4B91f7 12f6 6b4B71b4B idlarray[data]e12\f6 Produces an IDL array of arbitrary dimensionality from a list-structure description of its properties. The list data begins with an optional title followed by a representation of its shape and labelling, an optional format, and a list of values to be filled into the array in row-major order. l4233j\f6 12f1 3f0 98b4B178f6 idlarrayp[a]e12\f6 Returns T if a is an IDL array, otherwise returns NIL.l4233j\f6 8f1 1f0 4b1B7f1 3f0 26f1 3f0 1f6 idlmatrix[data]e12\f6 Produces a two-dimensional IDL array from data, a list structure describing its labels and values. data is a list each element of which is a list representing one row of the output matrix. The row specifications may be optionally preceded by one list of the form (TITLES title-string dimension1-label dimension2-label), and another of the form (LABELS level1-labels level2-labels ...). The level labels are for levels on the second dimension of the output. Each row-list is a sequence of data values optionally preceded by the labels for that first-dimension level. The labels for a non-codebook level consist simply of a literal atom; a codebook is specified in the format (level-label codepair1 codepair2 ...).l4233j\f6 27f1 3f6 12b4B54b4B162f7 6f6 75f7 6f6 178f0 37f6 132f1o252 1f0o0 9f1o252 1f0o0 4f6 invert[m]e12\f6 Produces the matrix inverse of m. Equivalent to (SWEEP M ALL).l4233j\f6 31b1B17g1f1G13f6 keep[a;dims...]e12\f6 No-spread. Produces a copy of a with dims added to its kept dimensions. If dims is the literal ALL, then all the dimensions of a will be kept. If no dims are specified, a vector of the currently kept dimensions is returned.l4233j\f6 31b1B6b4B35b4B16f7 3f6 29b1B22b4B label[dim;lev]e12\f6 Constructs a label selector to be given to at that will reference the label for dimension dim (if lev is NIL) or the label for level lev on dimension dim.l4233j\f6 43i2I45b3B5b3B4f7 3f6 25b3B14b3B leave[a;dims...]e12\f6 No-spread. Produces a new array from a with dims removed from its kept dimensions. If the first of dims is the literal ALL, then all of its kept dimensions will be eliminated.l4233j\f6 38b1B6b4B52b4B16f7 3f6 listarray[a]e12\f6 Converts IDL array a into a list structure from which idlarray can reconstruct the original.l4233j\f6 9f1 3f6 7b1B34i8I listmatrix[m]e12\f6 Converts IDL matrix m into a list structure from which idlmatrix can reconstruct the original.l4233j\f6 9f1 3f6 8b1B34i9I mprod[a;b]e12\f6 Matrix product of a and b. If they are vectors, mprod coerces them in the obvious way.l4233j\f6 18b1B5b1B23i5I moments[a;wt;m]e12\f6 Returns a vector of length m+1 containing the number of non-NIL values (moment 0) and the first m moments of array a, using wt as a weighting array. The first moment is the mean, the second is the variance, the third is closely related to the skew, etc. If m is NIL, it is defaulted to two and the N, mean, and variance are computed.l4233j\f6 27b1B32f7 3f6 33b1B18b1B8b2B133b1B4f7 3f6 33f1 1f6 norm[m]e12\f6 Norms matrix m by dividing each entry by the square root of the product of its basis (diagonal) elements.l4233j\f6 13b1B nprob[z]e12\f6 Returns the one-tailed probability of a normal deviate of size z.l4233j\f6 63b1B order[v;cfn]e12\f6 Returns a permutation vector which will order vector v by comparison function cfn. If cfn is not specified, lessp is used.l4233j\f6 53b1B24b3B6b3B19i5I pairn[a;wt]e12\f6 Returns a matrix of the pairwise N corresponding to a covariation matrix on a, using wt as a weighting vector.l4233j\f6 33f7 1f6 42b1B8b2B plot[y;x;file]e12\f6 Plots the vector y against the vector x (one through length y, if not given) on the primary output file, or file if specified. The axes are scaled so that they are approximately the same size. This scaling is controlled by the global variable PLOT.AXIS.RATIO. If file is not an open file, it is opened, the plot is printed, and then file is closed.l4233j\f6 17b1B20b1B21b1B47b4B133f7 15f6 6b4B66b4B plusp[x]e12\f6 A predicate which is T if the scalar x is greater than zero.l4233j\f6 21f1 1f6 15b1f0B21f6 pool[mtable]e12\f6 Collapses mtable into a 3-vector of the pooled cell N, mean, and variance. Effectively removes factors from a moments array.l4233j\f6 10b6B36f7 1f6 ppa[a;file]e12\f6 Prints the array a on the primary output file, or file if specified. If file is not an open file, it is opened, the array is printed, and then file is closed. The precision of numbers in the table is determined by the global variable PRECISION, a list specifying the number of digits to appear to the right and left of the decimal point. The initial setting is (4 3) so that numbers are printed in the format rrrr.lll. The global variable ROWLABELWIDTH is an integer determining the number of columns to leave for the labels on rows (initially 8).l4233j\f6 17b1B32b4B19b4B67b4B88f7 9f6 198f7 13f6 randn[mean;stdev]e12\f6 Returns a single number randomly sampled from the normal distribution with mean mean (default 0) and standard deviation stdev (default 1).l4233j\f6 80b4f0B36b5B12f6 rank[a]e12\f6 Ranks the array a in ascending order. Result will be integer unless floating is necessary to resolve ties. Cells containing NIL are ignored in computing the ranks, and the corresponding cells in the value will be NIL.l4233j\f6 16b1B37v7V65f1 3f0 86f1 3f0 1f6 readidlarray[file]e12\f6 Constructs an IDL array from an expression read from file (primary input file if file is NIL). If file is not an open file, it is opened, the expression is read, and then file is closed. dumpidlarray produces an expression of the appropriate form.l4233j\f6 14f1 3f6 36b4f0B24b4B4f1 3f0 2f6 5b4B69b4B13i12f0I48f6 reduce[a;fn;startval]e12\f6 Applies function fn left associatively to the elements of a. If startval is given, fn is first applied to startval and a1, otherwise to a1 and a2. Thus, (REDUCE ARY 'NCONC1 NIL) returns a list of the elements of ARY. reduce distinguishes the situation where startval is specified as NIL from the case where it is not specified at all, so (REDUCE ARY 'NCONC1) will ignore a1 as it is not a list.l4233j\f6 17b2B39b1B6b8B11b2B21b8B5b1f7o252B1f6o0 15b1f7o252B1f6o0 5b1f7o252B1f6o0 9f7 24f6 35f7 3f6 3i6I35b8B17f7 3f6 52f7 20f6 13b1f7o252B1f6o0 reshape[a;newshape;newformat]e12\f6 Reshapes a to an array of shape newshape and format newformat (optional, default FULL). The elements of a are put into the new array in rowmajor order. If newshape is NIL, a is simply flattened into a vector.l4233j\f6 9b1B22b8B12b9B20f7 4f6 20b1B51b8B4f7 3f6 2b1B round[val;interval]e12\f6 Rounds val to the nearest integral multiple of interval. Thus, (ROUND 1.45 .5)=1 and (ROUND 785 100)=800.l4233j\f6 7b3B37b8B9f1 17f6 5f1 7g1G9g1G3f6 rplus[a]e12\f6 Equivalent to reduce[a;quote[plus];0].l4233j\f6 21b1B rtimes[a]e12\f6 Equivalent to reduce[a;quote[times];1].l4233j\f6 21b1B same[a;b]e12\f6 Returns one if eqp[a;b], zero otherwise.l4233j\f6 8f0 11b1B1b1B17f6 scalarp[s]e12\f6 Returns T if s is a scalar, otherwise NIL.l4233j\f6 8f1 1f0 4b1B24f1 3f0 1f6 seek[sought;vec]e12\f6 sought can be a vector or a one argument function. Returns the (ordered) vector of indices of elements of vec which are found in, or which satisfy, sought.l4233j\f6b6B101b3B39b6B shape[a]e12\f6 Returns a vector giving the shape of array a.l4233j\f6 43b1B shift[v;shift;fill]e12\f6 Returns the vector formed by shifting vector v shift places (positive shifts right; negative shifts left) shifting in elements from the opposite end of fill to replace moved elements. fill can be a scalar or a vector. If fill is omitted, v is "rotated", i.e., the element shifted out one end is shifted in at the other.l4233j\f6 45b1B1b5B100b4B29b4B34b4f0B11f6 2b1B sweep[m;outvars;invars]e12\f6 Sweeps out variance components of matrix m corresponding to outvars (a selector for the second dimension of m); then sweeps in components corresponding to invars.l4233j\f6 41b1B18b7B41b1B46b6B title[]e12\f6 Returns a selector that can be given to at to reference the title of an array.l4233j\f6 40i2I tprob[x;df]e12\f6 Returns the probability of a t-value of x with degrees of freedom df.l4233j\f6 29i1I10b1B25b2B translate[s;table;default]e12\f6 Translates the scalar s according to the matrix table. If table has one column (or is a vector), the index of (the first) s in table is returned. If it has two columns, the second element of the row whose first element is s is returned. If three columns, the third element of the row such that s is between the first and second elements is returned. In the three-column case, a NIL in the first two columns only matches a NIL s; otherwise, a NIL in column 1 is interpreted as # while a NIL in column 2 is interpreted as +#. If no match is found, default is returned if it is specified; otherwise the value is s itself.l4233j\f6 22b1B25b5B6b5B59b1B4b5B91b1B72b1B84f1 3f6 13f0 28f1 3f0 1f6b1f0B15f1 3f0 31g1f3G1f0 9f1 3f0 32f3 1f0 3f6 22b7f0B56f6b1f0B8f6 transpose[a;perm]e12\f6 Transposes a by mapping each of its dimensions onto the dimension of the output given by the corresponding element of perm. Two dimensions that are mapped onto the same dimension of the output are represented by their joint diagonal. If perm is not given, the dimensions are reversed. l4233j\f6 11b1B106b4B117b4B In addition to the above, the mixed-arithmetic operators plus, times, etc., and most of the other arithmetic functions in Interlisp have been extended to apply element-wise across arrays. The infix operators +,*,,/ have been mapped onto the mixed-arithmetic operators instead of the integer operators as in standard Interlisp.e12j\f6 57i4I2i5I145f0g1f6G IDL implements a new kind of Lisp function, an ELAMBDA, to simplify the task of defining extended functions. The key-word ELAMBDA is used instead of LAMBDA in the function definition, and the size of the expected object can be associated with each argument name. For example,e12j\f1 3f6 44f7 7f6 69f7 7f6 20f7 6f6 [DEFINEQ (FOO (ELAMBDA ((M MATRIX) (V VECTOR)) (ADJOIN M (KEEP V 1]l4233e6j\f7 67f6 which adds V as a new column to M, is equivalent toe6j\f6 11f1 1f0 20f1 1f0 2f6 [DEFINEQ (FOO (LAMBDA (M V) (EAPPLY* '(LAMBDA (M V) (ADJOIN M (KEEP V 1))) '(MATRIX VECTOR) M V].l4233e6j(0,11072)(1,13344)\f7 98f6 The IDL system defines the file package command IDLARRAYS for dumping IDL arrays via makefile onto ordinary Lisp files in load-able format. (The Lisp ARRAYS command only dumps regular Lisp arrays.)e12j(635)\f6 4f1 3f6 41f1 10f6 12f1 3f6 12i8I29i4I25f7 6f6 IDL automatically opens a Lisp DRIBBLE file at the beginning of each session, which maintains a transcript of all interactions with the system. This file is named IDL.TYPESCRIPT on the login directory. It is a temporary file, and will disappear when the user logs off Tenex; it must be explicitly renamed or copied to another file if the contents are to be preserved.e12j\f1 3f6 28f7 7f6 126f7 14f6 Finally, the facilities of SHOW are included in IDL. Thus, the command SHOW may be given to the Interlisp executive to cause the value of the last expression typed in to be pretty-printed. This augmentation to the Lisp system greatly improves the convenience of IDL interactions. For more details, see SHOW.TTY.e12j\f6 28f7 9f6 1f7 4f6 17f1 3f6 21f7 4f6 188f1 3f6 39f7 9f6 1f7 8f6