Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

eis_rsb.c File Reference

#include "f2c.h"

Go to the source code of this file.


Functions

int rsb_ (integer *nm, integer *n, integer *mb, doublereal *a, doublereal *w, integer *matz, doublereal *z__, doublereal *fv1, doublereal *fv2, integer *ierr)

Function Documentation

int rsb_ integer   nm,
integer   n,
integer   mb,
doublereal   a,
doublereal   w,
integer   matz,
doublereal   z__,
doublereal   fv1,
doublereal   fv2,
integer   ierr
 

Definition at line 8 of file eis_rsb.c.

References a, bandr_(), tql2_(), and tqlrat_().

00011 {
00012     /* System generated locals */
00013     integer a_dim1, a_offset, z_dim1, z_offset;
00014 
00015     /* Local variables */
00016     extern /* Subroutine */ int bandr_(integer *, integer *, integer *, 
00017             doublereal *, doublereal *, doublereal *, doublereal *, logical *,
00018              doublereal *);
00019     static logical tf;
00020     extern /* Subroutine */ int tqlrat_(integer *, doublereal *, doublereal *,
00021              integer *), tql2_(integer *, integer *, doublereal *, doublereal 
00022             *, doublereal *, integer *);
00023 
00024 
00025 
00026 /*     THIS SUBROUTINE CALLS THE RECOMMENDED SEQUENCE OF */
00027 /*     SUBROUTINES FROM THE EIGENSYSTEM SUBROUTINE PACKAGE (EISPACK) */
00028 /*     TO FIND THE EIGENVALUES AND EIGENVECTORS (IF DESIRED) */
00029 /*     OF A REAL SYMMETRIC BAND MATRIX. */
00030 
00031 /*     ON INPUT */
00032 
00033 /*        NM  MUST BE SET TO THE ROW DIMENSION OF THE TWO-DIMENSIONAL */
00034 /*        ARRAY PARAMETERS AS DECLARED IN THE CALLING PROGRAM */
00035 /*        DIMENSION STATEMENT. */
00036 
00037 /*        N  IS THE ORDER OF THE MATRIX  A. */
00038 
00039 /*        MB  IS THE HALF BAND WIDTH OF THE MATRIX, DEFINED AS THE */
00040 /*        NUMBER OF ADJACENT DIAGONALS, INCLUDING THE PRINCIPAL */
00041 /*        DIAGONAL, REQUIRED TO SPECIFY THE NON-ZERO PORTION OF THE */
00042 /*        LOWER TRIANGLE OF THE MATRIX. */
00043 
00044 /*        A  CONTAINS THE LOWER TRIANGLE OF THE REAL SYMMETRIC */
00045 /*        BAND MATRIX.  ITS LOWEST SUBDIAGONAL IS STORED IN THE */
00046 /*        LAST  N+1-MB  POSITIONS OF THE FIRST COLUMN, ITS NEXT */
00047 /*        SUBDIAGONAL IN THE LAST  N+2-MB  POSITIONS OF THE */
00048 /*        SECOND COLUMN, FURTHER SUBDIAGONALS SIMILARLY, AND */
00049 /*        FINALLY ITS PRINCIPAL DIAGONAL IN THE  N  POSITIONS */
00050 /*        OF THE LAST COLUMN.  CONTENTS OF STORAGES NOT PART */
00051 /*        OF THE MATRIX ARE ARBITRARY. */
00052 
00053 /*        MATZ  IS AN INTEGER VARIABLE SET EQUAL TO ZERO IF */
00054 /*        ONLY EIGENVALUES ARE DESIRED.  OTHERWISE IT IS SET TO */
00055 /*        ANY NON-ZERO INTEGER FOR BOTH EIGENVALUES AND EIGENVECTORS. */
00056 
00057 /*     ON OUTPUT */
00058 
00059 /*        W  CONTAINS THE EIGENVALUES IN ASCENDING ORDER. */
00060 
00061 /*        Z  CONTAINS THE EIGENVECTORS IF MATZ IS NOT ZERO. */
00062 
00063 /*        IERR  IS AN INTEGER OUTPUT VARIABLE SET EQUAL TO AN ERROR */
00064 /*           COMPLETION CODE DESCRIBED IN THE DOCUMENTATION FOR TQLRAT */
00065 /*           AND TQL2.  THE NORMAL COMPLETION CODE IS ZERO. */
00066 
00067 /*        FV1  AND  FV2  ARE TEMPORARY STORAGE ARRAYS. */
00068 
00069 /*     QUESTIONS AND COMMENTS SHOULD BE DIRECTED TO BURTON S. GARBOW, */
00070 /*     MATHEMATICS AND COMPUTER SCIENCE DIV, ARGONNE NATIONAL LABORATORY 
00071 */
00072 
00073 /*     THIS VERSION DATED AUGUST 1983. */
00074 
00075 /*     ------------------------------------------------------------------ 
00076 */
00077 
00078     /* Parameter adjustments */
00079     --fv2;
00080     --fv1;
00081     z_dim1 = *nm;
00082     z_offset = z_dim1 + 1;
00083     z__ -= z_offset;
00084     --w;
00085     a_dim1 = *nm;
00086     a_offset = a_dim1 + 1;
00087     a -= a_offset;
00088 
00089     /* Function Body */
00090     if (*n <= *nm) {
00091         goto L5;
00092     }
00093     *ierr = *n * 10;
00094     goto L50;
00095 L5:
00096     if (*mb > 0) {
00097         goto L10;
00098     }
00099     *ierr = *n * 12;
00100     goto L50;
00101 L10:
00102     if (*mb <= *n) {
00103         goto L15;
00104     }
00105     *ierr = *n * 12;
00106     goto L50;
00107 
00108 L15:
00109     if (*matz != 0) {
00110         goto L20;
00111     }
00112 /*     .......... FIND EIGENVALUES ONLY .......... */
00113     tf = FALSE_;
00114     bandr_(nm, n, mb, &a[a_offset], &w[1], &fv1[1], &fv2[1], &tf, &z__[
00115             z_offset]);
00116     tqlrat_(n, &w[1], &fv2[1], ierr);
00117     goto L50;
00118 /*     .......... FIND BOTH EIGENVALUES AND EIGENVECTORS .......... */
00119 L20:
00120     tf = TRUE_;
00121     bandr_(nm, n, mb, &a[a_offset], &w[1], &fv1[1], &fv1[1], &tf, &z__[
00122             z_offset]);
00123     tql2_(nm, n, &w[1], &fv1[1], &z__[z_offset], ierr);
00124 L50:
00125     return 0;
00126 } /* rsb_ */
 

Powered by Plone

This site conforms to the following standards: