cgebal


NAME

cgebal - balance a general complex matrix A


SYNOPSIS

  SUBROUTINE CGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO)
  CHARACTER * 1 JOB
  COMPLEX A(LDA,*)
  INTEGER N, LDA, ILO, IHI, INFO
  REAL SCALE(*)
 
  SUBROUTINE CGEBAL_64( JOB, N, A, LDA, ILO, IHI, SCALE, INFO)
  CHARACTER * 1 JOB
  COMPLEX A(LDA,*)
  INTEGER*8 N, LDA, ILO, IHI, INFO
  REAL SCALE(*)
 

F95 INTERFACE

  SUBROUTINE GEBAL( JOB, [N], A, [LDA], ILO, IHI, SCALE, [INFO])
  CHARACTER(LEN=1) :: JOB
  COMPLEX, DIMENSION(:,:) :: A
  INTEGER :: N, LDA, ILO, IHI, INFO
  REAL, DIMENSION(:) :: SCALE
 
  SUBROUTINE GEBAL_64( JOB, [N], A, [LDA], ILO, IHI, SCALE, [INFO])
  CHARACTER(LEN=1) :: JOB
  COMPLEX, DIMENSION(:,:) :: A
  INTEGER(8) :: N, LDA, ILO, IHI, INFO
  REAL, DIMENSION(:) :: SCALE
 

C INTERFACE

#include <sunperf.h>

void cgebal(char job, int n, complex *a, int lda, int *ilo, int *ihi, float *scale, int *info);

void cgebal_64(char job, long n, complex *a, long lda, long *ilo, long *ihi, float *scale, long *info);


PURPOSE

cgebal balances a general complex matrix A. This involves, first, permuting A by a similarity transformation to isolate eigenvalues in the first 1 to ILO-1 and last IHI+1 to N elements on the diagonal; and second, applying a diagonal similarity transformation to rows and columns ILO to IHI to make the rows and columns as close in norm as possible. Both steps are optional.

Balancing may reduce the 1-norm of the matrix, and improve the accuracy of the computed eigenvalues and/or eigenvectors.


ARGUMENTS

* JOB (input)
Specifies the operations to be performed on A:

* N (input)
The order of the matrix A. N >= 0.

* A (input/output)
On entry, the input matrix A. On exit, A is overwritten by the balanced matrix. If JOB = 'N', A is not referenced. See Further Details.

* LDA (input)
The leading dimension of the array A. LDA >= max(1,N).

* ILO (output)
ILO and IHI are set to integers such that on exit A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N. If JOB = 'N' or 'S', ILO = 1 and IHI = N.

* IHI (output)
ILO and IHI are set to integers such that on exit A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N. If JOB = 'N' or 'S', ILO = 1 and IHI = N.

* SCALE (output)
Details of the permutations and scaling factors applied to A. If P(j) is the index of the row and column interchanged with row and column j and D(j) is the scaling factor applied to row and column j, then SCALE(j) = P(j) for j = 1,...,ILO-1

* INFO (output)