Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0026/dapll.doc
There are 2 other files named dapll.doc in the archive. Click here to see a list.
SUBROUTINE DAPLL
PURPOSE
   SET UP NORMAL EQUATIONS FOR A LINEAR LEAST SQUARES FIT
   TO A GIVEN DISCRETE FUNCTION

USAGE
   CALL DAPLL(FFCT,N,IP,P,WORK,DATI,IER)
   SUBROUTINE FFCT REQUIRES AN EXTERNAL STATEMENT

DESCRIPTION OF PARAMETERS
   FFCT  - USER CODED SUBROUTINE WHICH MUST BE DECLARED
	   EXTERNAL IN THE MAIN PROGRAM. IT IS CALLED
	   CALL FFCT(I,N,IP,P,DATI,WGT,IER) AND RETURNS
	   THE VALUES OF THE FUNDAMENTAL FUNCTIONS FOR
	   THE I-TH ARGUMENT IN P(1) UP TO P(IP)
	   FOLLOWED BY THE I-TH FUNCTION VALUE IN P(IP+1)
	   N IS THE NUMBER OF ALL POINTS
	   P,DATI,WGT MUST BE OF DOUBLE PRECISION.
	   DATI IS A DUMMY PARAMETER WHICH IS USED AS ARRAY
	   NAME. THE GIVEN DATA SET MAY BE ALLOCATED IN DATI
	   WGT IS THE WEIGHT FACTOR FOR THE I-TH POINT
	   IER IS USED AS RESULTANT ERROR PARAMETER IN FFCT
   N	 - NUMBER OF GIVEN POINTS
   IP	 - NUMBER OF FUNDAMENTAL FUNCTIONS USED FOR LEAST
	   SQUARES FIT
	   IP SHOULD NOT EXCEED N
   P	 - WORKING STORAGE OF DIMENSION IP+1, WHICH
	   IS USED AS INTERFACE BETWEEN APLL AND THE USER
	   CODED SUBROUTINE FFCT
	   P MUST BE OF DOUBLE PRECISION.
   WORK  - WORKING STORAGE OF DIMENSION (IP+1)*(IP+2)/2.
	   ON RETURN WORK CONTAINS THE SYMMETRIC COEFFICIENT
	   MATRIX OF THE NORMAL EQUATIONS IN COMPRESSED FORM,
	   I.E. UPPER TRINGULAR PART ONLY STORED COLUMNWISE.
	   THE FOLLOWING IP POSITIONS CONTAIN THE RIGHT
	   HAND SIDE AND WORK((IP+1)*(IP+2)/2) CONTAINS
	   THE WEIGHTED SQUARE SUM OF THE FUNCTION VALUES
	   WORK MUST BE OF DOUBLE PRECISION.
   DATI  - DUMMY ENTRY TO COMMUNICATE AN ARRAY NAME BETWEEN
	   MAIN LINE AND SUBROUTINE FFCT.
	   DATI MUST BE OF DOUBLE PRECISION.
   IER	 - RESULTING ERROR PARAMETER
	   IER =-1 MEANS FORMAL ERRORS IN SPECIFIED DIMENSIONS
	   IER = 0 MEANS NO ERRORS
	   IER = 1 MEANS ERROR IN EXTERNAL SUBROUTINE FFCT

REMARKS
   TO ALLOW FOR EASY COMMUNICATION OF INTEGER VALUES
   BETWEEN MAINLINE AND EXTERNAL SUBROUTINE FFCT, THE ERROR
   PARAMETER IER IS TREATED AS A VECTOR OF DIMENSION 1 WITHIN
   SUBROUTINE DAPLL. ADDITIONAL COMPONENTS OF IER MAY BE
   INTRODUCED BY THE USER FOR COMMUNICATION BACK AND FORTH.
   IN THIS CASE, HOWEVER, THE USER MUST SPECIFY IER AS A
   VECTOR IN HIS MAINLINE.
   EXECUTION OF SUBROUTINE DAPLL IS A PREPARATORY STEP FOR
   CALCULATION OF THE LINEAR LEAST SQUARES FIT.
   NORMALLY IT IS FOLLOWED BY EXECUTION OF SUBROUTINE DAPFS

UBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   THE EXTERNAL SUBROUTINE FFCT MUST BE FURNISHED BY THE USER

METHOD
   HANDLING OF THE GIVEN DATA SET (ARGUMENTS,FUNCTION VALUES
   AND WEIGHTS) IS COMPLETELY LEFT TO THE USER
   ESSENTIALLY HE HAS THREE CHOICES
   (1) THE I-TH VALUES OF ARGUMENT, FUNCTION VALUE AND WEIGHT
       ARE CALCULATED WITHIN SUBROUTINE FFCT FOR GIVEN I.
   (2) THE I-TH VALUES OF ARGUMENT, FUNCTION VALUE AND WEIGHT
       ARE DETERMINED BY TABLE LOOK UP. THE STORAGE LOCATIONS
       REQUIRED ARE ALLOCATED WITHIN THE DUMMY ARRAY DATI
       (POSSIBLY IN P TOO, IN EXCESS OF THE SPECIFIED IP + 1
       LOCATIONS).
       ANOTHER POSSIBILITY WOULD BE TO USE COMMON AS INTERFACE
       BETWEEN MAIN LINE AND SUBROUTINE FFCT AND TO ALLOCATE
       STORAGE FOR THE DATA SET IN COMMON.
   (3) THE I-TH VALUES OF ARGUMENT, FUNCTION VALUE AND WEIGHT
       ARE READ IN FROM AN EXTERNAL DEVICE. THIS MAY BE EASILY
       ACCOMPLISHED SINCE I IS USED STRICTLY INCREASING FROM
       ONE UP TO N WITHIN APLL