(XLISP::CHECK-FSL-VERSION 1 4)
#K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(SIZE #K(#(80 2 0 0 25 0 0 1 1) #(0) #(ARRAY-DIMENSIONS) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (x)
Returns the normal scores of the elements of x." FUNCTION-DOCUMENTATION NSCORES %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(NSCORES #K(#(80 2 0 4 23 0 2 1 1 23 1 3 1 1 61 112 2 4 61 112 3 5 2 47 4 5 2 25 2 0 1 2) #(0) #(RANK LENGTH NORMAL-QUANT) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (x)
Returns the sum of squares of the elements of x." FUNCTION-DOCUMENTATION SSQ %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(SSQ #K(#(80 2 1 0 1 23 1 3 2 1 2 25 2 0 1 3) #(0) #(2 ^ SUM) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (x)
Returns the standard deviation of the elements x. Vector reducing.
Issues warning on zero standard deviation. Return nil when one datum." FUNCTION-DOCUMENTATION STANDARD-DEVIATION %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(STANDARD-DEVIATION #K(#(80 2 4 0 1 2 3 5 23 4 6 1 1 23 5 7 1 1 2 45 1 7 7 0 5 8 37 62 1 3 6 4 2 42 7 7 9 23 5 9 1 9 2 45 6 4 10 2 47 6 10 10 2 42 9 10 9 23 6 8 1 9 37 61 2 3 8 3 23 7 0 1 2 11 0 8) #(0 32 68 73) #("A variable has no variance." 0 1 NIL COUNT-ELEMENTS MEAN SQRT ERROR-MESSAGE) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(VARIANCE #K(#(80 2 2 0 1 2 23 2 4 1 1 0 4 5 21 0 1 2 5 23 3 4 2 4 2 11 0 4) #(0 19 25) #(2 NIL STANDARD-DEVIATION ^) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)
#K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(RANGE #K(#(80 2 3 0 1 2 3 23 3 5 1 1 23 4 6 2 4 3 23 5 5 2 5 6 23 5 6 2 5 3 23 5 7 2 5 2 2 45 6 7 0 57 0) #(0) #(1 0 4 FIVNUM LIST SELECT) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)
#K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(MID-RANGE #K(#(80 2 2 0 1 2 23 2 4 1 1 23 3 5 2 3 2 23 4 4 2 4 5 25 5 0 1 4) #(0) #(4 0 FIVNUM LIST SELECT MEAN) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)
#K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(SKEWNESS #K(#(80 2 6 0 1 2 3 4 5 6 23 6 8 1 1 23 7 8 2 8 7 23 8 9 1 1 2 45 1 9 9 23 7 9 2 9 7 23 9 10 1 1 0 6 11 37 61 1 2 5 8 25 10 0 1 2 37 62 3 4 10 4 2 45 10 3 12 2 45 10 4 13 2 42 12 13 12 2 47 10 12 12 2 47 9 8 13 23 11 13 1 13 2 42 12 13 11 11 0 11 11 0 6) #(0 51 56 62 100) #("Skewness Undefined." 1 2 0 NIL 3 STANDARD-DEVIATION ^ MEAN LENGTH ERROR-MESSAGE SUM) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)
#K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(KURTOSIS #K(#(80 2 7 0 1 2 3 4 5 6 8 23 7 9 1 1 23 8 9 2 9 8 23 9 10 1 1 2 45 1 10 10 23 8 10 2 10 8 23 10 11 1 1 0 7 12 37 61 1 2 6 9 25 11 0 1 2 37 62 3 4 11 5 2 43 11 4 13 2 42 11 13 13 2 45 11 4 14 2 45 11 3 15 2 45 11 5 16 23 12 14 3 14 15 16 2 47 13 14 13 2 47 10 9 14 23 13 14 1 14 2 42 13 14 13 2 45 11 4 14 2 45 11 4 15 23 12 14 3 5 14 15 2 45 11 3 15 2 45 11 5 16 2 42 15 16 15 2 47 14 15 14 2 45 13 14 12 11 0 12 11 0 7) #(0 52 57 63 160) #("Kurtosis Undefined." 2 1 3 0 NIL 4 STANDARD-DEVIATION ^ MEAN LENGTH ERROR-MESSAGE * SUM) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (matrix &key types)
 Takes a nxm multivariate matrix and returns a correlation matrix. Types is 
an m-vector of variable type strings (category, ordinal, numeric). Uses all n 
of the input matrix's v_ariables if :types not specified, only the numeric variables if :types is specifed." FUNCTION-DOCUMENTATION CORRELATION-MATRIX %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(CORRELATION-MATRIX #K(#(77 3 2 0 0 0 5 4 4 0 1 2 3 3 0 1 7 21 0 1 2 2 23 6 8 1 1 23 7 8 2 8 5 23 8 8 1 8 23 9 9 2 3 2 23 7 7 3 1 8 9 23 10 8 1 7 23 11 7 2 8 6 23 12 8 1 7 23 13 8 2 8 7 23 14 9 1 7 23 7 9 2 9 5 2 45 9 6 9 2 47 8 9 0 57 0) #(0 22 51) #(("numeric") NIL 0 1 (NIL) (:TYPES) SIZE SELECT ISEQ $POSITION CENTER NORMALIZE TRANSPOSE MATMULT ARRAY-DIMENSIONS) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(SV-DECOMP2 #K(#(80 2 4 0 1 2 3 5 23 4 6 1 1 23 5 7 2 6 5 23 5 8 2 6 4 37 60 1 2 7 8 23 6 6 1 1 23 7 6 1 6 23 5 7 2 6 3 23 5 8 2 6 4 23 5 9 2 6 5 23 5 10 2 6 2 25 8 0 4 7 8 9 10 25 7 0 1 1) #(0 31 73) #(3 2 1 0 ARRAY-DIMENSIONS SELECT TRANSPOSE SV-DECOMP LIST) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: DATA &key (CORR t)
Performs a principal components analysis of DATA. Computes Covariances if CORR is nil. Returns a list of three things: A matrix of scores, a vector of eigenvalues & a matrix of coefficients." FUNCTION-DOCUMENTATION PCA %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(PCA #K(#(77 3 2 0 0 0 6 5 6 0 0 1 2 3 4 6 21 0 1 2 2 23 7 10 1 1 23 8 10 2 10 7 23 9 11 1 1 23 10 11 2 11 8 61 109 11 11 23 11 11 1 11 2 47 10 11 10 1 3 23 7 10 1 1 23 9 11 1 1 23 10 11 2 11 8 61 109 11 11 23 11 11 1 11 2 47 10 11 10 23 12 10 1 10 23 10 11 2 10 9 23 13 11 2 11 8 23 14 11 1 11 37 60 4 5 11 8 23 10 12 2 10 8 2 42 5 12 12 23 15 0 3 10 8 12 23 10 12 2 10 9 2 42 4 12 12 23 15 0 3 10 9 12 23 10 11 2 10 8 23 10 12 2 10 7 23 16 12 2 12 3 23 17 12 1 12 23 18 11 2 11 12 23 10 12 2 10 7 23 16 12 2 12 9 23 10 13 2 10 9 23 10 14 2 10 7 61 109 3 15 23 16 14 2 14 15 23 17 14 1 14 23 18 13 2 13 14 25 19 0 3 11 12 13) #(0 21 59 89 117 153) #(-1 NIL 1 0 2 (T 1) (:CORR :LEFT-ALPHA) CENTER NORMALIZE ARRAY-DIMENSIONS SELECT SQRT SV-DECOMP2 COL SUM SET-SELECT ^ DIAGONAL %* LIST) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: DATA
Centers the columns of the matrix DATA. Returns a matrix." FUNCTION-DOCUMENTATION CENTER %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(CENTER #K(#(80 2 0 3 39 0 2 23 1 3 1 1 51 1 4 0 23 2 3 2 4 3 25 3 0 2 2 3 80 2 0 1 23 4 2 1 1 2 45 1 2 0 57 0) #(0 28) #(BIND-COLUMNS COLUMN-LIST MAPCAR APPLY MEAN) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: DATA-MATRIX &OPTIONAL STD-DEV
Normalize the scores on each variable to a mean of 0 and a standard deviation of 1 or any other desired value.  (Actually, SQRT(N-1) times DESIRED-STDEV.)" FUNCTION-DOCUMENTATION NORMALIZE %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(NORMALIZE #K(#(77 1 2 1 0 0 3 39 1 3 23 2 4 1 1 23 3 4 1 4 51 1 5 1 2 23 4 4 2 5 4 25 5 0 2 3 4 80 3 0 1 23 6 3 1 2 2 47 2 3 3 2 42 1 3 0 57 0) #(0 37) #(#(1) BIND-COLUMNS CENTER COLUMN-LIST MAPCAR APPLY STANDARD-DEVIATION) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Finds the orthogonal rotation matrix, which, when applied to MATRIX, will rotate MATRIX into as close a congruence with TARGET as possible." FUNCTION-DOCUMENTATION ORTHOGONAL-PROCRUSTEAN-ROTATION %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(ORTHOGONAL-PROCRUSTEAN-ROTATION #K(#(80 3 2 0 1 3 23 2 5 1 1 23 3 5 2 5 2 23 4 5 1 5 23 5 6 2 5 4 23 5 7 2 5 3 23 2 7 1 7 25 3 0 2 6 7) #(0) #(2 0 TRANSPOSE %* SV-DECOMP2 SELECT) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (A W Q)
A is a real matrix, W and Q are positive definite diagonal matrices.
Computes the generalized singular value decomposition of A such that A = NUM'  
where N'WN = M'QM = I. Returns a four-element list of the form (N U M FLAG) 
where N and M are matrices whose columns are the left and right generalized 
singular vectors of A and U is the sequence of generalized singular values of 
A. FLAG is T if the algorithm converged, NIL otherwise." FUNCTION-DOCUMENTATION GSV-DECOMP %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(GSV-DECOMP #K(#(80 4 4 0 1 2 3 5 23 4 8 1 1 23 5 8 2 8 7 23 4 9 1 1 23 5 9 2 9 6 37 71 1 2 8 9 23 6 8 1 2 23 6 9 1 3 23 7 8 3 8 1 9 23 8 8 1 8 23 9 9 1 2 23 6 9 1 9 23 5 10 2 8 7 23 7 9 2 9 10 23 5 10 2 8 6 23 9 11 1 3 23 6 11 1 11 23 5 12 2 8 5 23 7 11 2 11 12 23 5 12 2 8 4 25 10 0 4 9 10 11 12 23 6 8 1 2 23 6 9 1 3 23 7 8 3 8 1 9 23 11 8 1 8 23 8 8 1 8 23 9 9 1 2 23 6 9 1 9 23 5 10 2 8 5 23 7 9 2 9 10 23 5 10 2 8 6 23 9 11 1 3 23 6 11 1 11 23 5 12 2 8 7 23 7 11 2 11 12 23 5 12 2 8 4 25 10 0 4 9 10 11 12) #(0 36 122) #(3 2 1 0 SIZE SELECT SQRT MATMULT SV-DECOMP INVERSE LIST TRANSPOSE) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (matrix)
Takes a nxm multivariate matrix and returns a euclidean distance matrix." FUNCTION-DOCUMENTATION DISTANCE-MATRIX %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(DISTANCE-MATRIX #K(#(80 2 2 0 1 6 23 2 4 1 1 23 3 4 2 1 4 23 4 5 1 4 23 5 6 1 5 23 6 7 2 3 6 23 7 7 2 5 7 2 42 2 4 8 23 6 9 2 3 6 23 7 9 2 9 5 23 8 4 3 7 8 9 25 9 0 1 4) #(0) #(-2 1 TRANSPOSE MATMULT DIAGONAL LENGTH REPEAT OUTER-PRODUCT + SQRT) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Method Args: (MATRIX &key (COLUMN-ORDER (iseq num-columns-in-matrix)) (UNPERMUTE 'nil) (NORM 'nil))
Performs a Gram-Schmidt Orthogonalization on the columns of MATRIX.  
XT = X* ;   T = (inverse R) {from QDR decomp};   (X*'X*) = D or I depending on whether orthog. or orthonorm. was performed. Returns a list of lists containing: COLUMN-ORDER (order in which columns of X were orthogonalized), X*, T. If the keyword argument :COLUMN-ORDER is provided and the keyword argument :UNPERMUTE is given a 'nil value (the default), then the GS-Orthogonalization will be performed on the matrix whose columns are appropriately permuted. (XP)T = (X*P). In this case, the result list will contain the results from the !!!permuted!!! form of MATRIX: [COLUMN-ORDER, (X*P), & T]. If, in this same case, the keyword argument :UNPERMUTE is supplied a value of 't, the solution will be determined as above, but the final results will un-permute the X and X* matrices and appropriately permute the transformation such that the GS equations hold as: X [inverse(TP') P'] = X*. Here, the result list contains the original matrix X, the transformation matrix which orthogonalizes the columns in the proper order
[inverse(TP') P'], and the un-permuted transformed data matrix, X* (which contains columns orthogonalized in COLUMN-ORDER but left in their original matrix positions). If the keyword argument  :NORM T  is provided, then a GS-OrthoNORMALization will be performed instead of an orthogonalization." FUNCTION-DOCUMENTATION GS-ORTHOG %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(GS-ORTHOG #K(#(77 3 2 0 0 0 6 5 5 0 1 2 3 4 5 21 2 1 2 2 0 2 10 1 3 23 7 10 1 1 23 8 10 2 10 9 23 9 10 1 10 23 10 11 1 10 23 11 11 1 11 23 7 12 1 1 23 8 12 2 12 9 37 35 4 5 11 12 23 12 0 1 5 23 13 11 2 1 10 21 0 6 7 4 38 14 12 23 15 11 3 11 12 6 1 8 38 14 12 23 16 11 3 11 12 6 21 0 9 12 3 23 11 12 1 10 23 9 12 1 12 51 15 13 1 10 23 17 12 2 13 12 21 0 10 11 4 23 8 13 2 11 8 23 13 13 2 13 12 23 8 14 2 11 9 23 13 14 2 14 12 23 18 14 1 14 23 13 14 2 14 12 25 19 0 3 10 13 14 23 8 13 2 11 8 23 8 14 2 11 9 23 20 14 1 14 23 21 13 2 13 14 23 13 13 2 13 12 23 8 14 2 11 7 23 13 14 2 14 12 23 18 14 1 14 23 13 14 2 14 12 25 19 0 3 10 13 14 21 0 13 14 4 23 8 12 2 11 8 23 8 13 2 11 9 23 18 13 1 13 25 19 0 3 10 12 13 23 8 12 2 11 8 23 8 13 2 11 9 23 20 13 1 13 23 21 12 2 12 13 23 8 13 2 11 7 23 18 13 1 13 25 19 0 3 10 12 13 80 3 0 0 25 22 0 2 2 1) #(0 20 25 41 68 73 84 96 106 111 137 179 238 243 267 308) #("Insufficient number of elements specified in :COLUMN-ORDER sequence." NIL 2 0 1 (%NOT-SUPPLIED NIL NIL) (:COLUMN-ORDER :UNPERMUTE :NORM) ARRAY-DIMENSIONS SELECT ISEQ REMOVE-DUPLICATES LENGTH ERROR PERMUTE-MATRIX :PIVOT QR-DECOMP2 QDR-DECOMP MAPCAR INVERSE LIST DIAGONAL %* POSITION) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (MATRIX NEW-ORDER &key (COL t) (ROW nil))
Permutes the columns (or rows) of MATRIX into the order specified by NEW-ORDER.  By default the columns are permuted.  If the keyword argument COL is 'nil or ROW is 't, the rows of the MATRIX will be permuted." FUNCTION-DOCUMENTATION PERMUTE-MATRIX %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(PERMUTE-MATRIX #K(#(77 3 3 0 0 0 5 4 4 0 1 2 3 4 23 6 9 1 1 23 7 10 1 2 21 0 5 1 4 21 0 2 5 3 23 8 11 1 10 23 9 12 2 9 5 37 35 3 4 11 12 25 10 0 1 6 23 11 11 1 1 23 9 11 2 11 10 25 12 0 1 11 23 8 11 1 10 23 9 12 2 9 8 37 35 6 7 11 12 25 10 0 1 6 38 13 11 23 14 11 3 1 11 7 23 9 9 2 11 10 25 15 0 1 9) #(0 29 34 51 56 72 89 94) #(1 "Incorrect length of new order list." T 0 (T NIL) (:COL :ROW) ARRAY-DIMENSIONS REMOVE-DUPLICATES LENGTH SELECT ERROR COLUMN-LIST BIND-COLUMNS2 :LIST ROW-LIST2 BIND-ROWS2) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (MATRIX &key (PIVOT 'nil)
A modification to QR-DECOMP2 which performs the factorization:X = QDR; Q'Q = I where D = (diagonal of original R); R = original R with its diagonal removed = (inverse D) %* (original R). Returns a list of lists containing: Q D R & (if PIVOT, then column-order). MATRIX is a matrix of real numbers with at least as many rows as columns. Computes the QR factorization of A and returns the result in a list of the form (Q D R).  If PIVOT is true the columns of X are first permuted to insure that the absolute values of the diagonal elements of R are nonincreasing.  In this case the result includes a third element, a list of the indices of the columns in the order in which they were used.  Also (from QR-DECOMP2) the diagonal values of R are all now guaranteed to be positive and the parameter PIVOT has been changed to a keyword parameter." FUNCTION-DOCUMENTATION QDR-DECOMP %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(QDR-DECOMP #K(#(77 3 2 0 0 0 5 4 4 0 1 2 3 5 38 6 7 23 7 7 3 1 7 2 23 8 8 2 7 6 23 9 8 1 8 2 47 6 8 9 23 9 9 1 9 23 8 10 2 7 6 23 10 9 2 9 10 23 8 10 2 7 5 21 0 1 2 2 23 8 11 2 7 3 1 3 0 4 11 25 11 0 4 10 8 9 11) #(0 68 76 79) #(2 NIL 0 1 (NIL) (:PIVOT) :PIVOT QR-DECOMP2 SELECT DIAGONAL %* LIST) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #((PROGN #K(#(80 1 3 0 1 2 0 25 3 0 3 3 2 1) #(0) #("Args: (MATRIX &key (PIVOT 'nil)
A slight modification to QR-DECOMP which insures that the diagonal values of R are all positive.  Also the parameter, PIVOT, has been changed from an optional parameter (in the original QR-DECOMP function) to a keyword parameter. MATRIX is a matrix of real numbers with at least as many rows as columns. Computes the QR factorization of A and returns the result in a list of the form (Q R).  If PIVOT is true the columns of X are first permuted to insure that the absolute values of the diagonal elements of R are nonincreasing.  In this case the result includes a third element, a list of the indices of the columns in the order in which they were used." FUNCTION-DOCUMENTATION QR-DECOMP2 %SET-GET) 0 NIL) #K(#(80 1 2 0 1 1 23 2 3 1 2 25 3 0 2 1 3) #(0) #(QR-DECOMP2 #K(#(77 3 2 0 0 0 5 4 4 0 1 2 3 6 23 6 7 2 1 2 23 7 8 2 7 6 23 8 8 1 8 23 9 9 1 1 23 7 9 2 9 6 23 10 9 2 6 9 23 11 10 1 8 23 12 10 1 10 51 4 11 1 9 23 13 0 2 11 10 23 7 10 2 7 5 23 8 11 1 9 23 14 10 2 10 11 23 8 11 1 9 23 7 12 2 7 6 23 14 11 2 11 12 21 0 1 2 2 23 7 12 2 7 3 1 3 0 4 12 25 15 0 3 10 11 12 80 3 1 16 0 25 17 0 3 1 2 3) #(0 108 116 119 126) #(2 NIL 0 1 (NIL) (:PIVOT) QR-DECOMP SELECT DIAGONAL ARRAY-DIMENSIONS REPEAT MINUSP WHICH MAPCAR %* LIST -1 SET-SELECT) 0 NIL) BYTE-CODE-CLOSE XLISP::INSTALL-FUNCTION) 0 NIL)) EVAL) 0 NIL)
#K(#(80 1 1 0 0 25 1 0 1 1) #(0) #("statfunc" PROVIDE) 0 NIL)
