CXML

ssyr2, dsyr2, cher2, zher2 


FORMAT

  {S,D}SYR2 (uplo, n, alpha, x, incx, y, incy, a, lda) {C,Z}HER2 (uplo, n,
  alpha, x, incx, y, incy, a, lda)

Arguments

  uplo                character*1
                      On entry, specifies whether the upper- or lower-
                      triangular part of the array A is referenced:

                      If uplo = 'U' or 'u', the upper-triangular part of A is
                      referenced.

                      If uplo = 'L' or 'l', the lower-triangular part of A is
                      referenced.
                      On exit, uplo is unchanged.

  n                   integer*4
                      On entry, the order of the matrix A; n >= 0.
                      On exit, n is unchanged.

  alpha               real*4 | real*8 | complex*8 | complex*16
                      On entry, the scalar alpha*.
                      On exit, alpha is unchanged.

  x                   real*4 | real*8 | complex*8 | complex*16
                      On entry, a one-dimensional array X of length at least
                      (1+(n-1)*|incx|).  Array X contains the vector x.
                      On exit, x is unchanged.

  incx                integer*4
                      On entry, the increment for the elements of X; incx
                      must not equal zero.
                      On exit, incx is unchanged.

  y                   real*4 | real*8 | complex*8 | complex*16
                      On entry, a one-dimensional array Y of length at least
                      (1+(n-1)*|incy|).  The incremented array Y must contain
                      the vector y.
                      On exit, y is unchanged.

  incy                integer*4
                      On entry, the increment for the elements of Y; incy
                      must not equal zero.
                      On exit, incy is unchanged.

  a                   real*4 | real*8 | complex*8 | complex*16
                      On entry, a two-dimensional array with dimensions lda
                      by n.

  When uplo specifies the upper portion of the matrix, the leading n by n
  part of the array contains the upper-triangular part of the matrix, and the
  lower-triangular part of array A is not referenced.

  When uplo specifies the lower  portion of the matrix,  the leading n by n
  part of the array contains the lower-triangular part of the matrix, and the
  upper-triangular part of array A is not referenced.

  For complex routines, the imaginary parts of the diagonal elements need not
  be set.  They are assumed to be 0, and on exit they are set to 0.

  On exit, a is overwritten; the specified part of the array A is overwritten
  by the specified part of the updated matrix.

  lda                 integer*4
                      On entry, the first dimension of array A; lda >=
                      MAX(1,n).
                      On exit, lda is unchanged.

Description

  SSYR2 and DSYR2 perform the rank-two update of a real symmetric matrix: A
  =  alpha*x*transp(y)
   + alpha*y*transp(x) + A

  CHER2 and ZHER2 perform the rank-two update of a complex Hermitian matrix:
  A  =  alpha*x*conjug_transp(y) + conjugate(alpha)*y*conjug_transp(x) + A

  alpha is a scalar, x and y are vectors with n elements, and A is an n by n
  matrix. In the case of SSYR2 and DSYR2, matrix A is a symmetric matrix and
  in the case of CHER2 and ZHER2, matrix A is a Hermitian matrix.

Example

  REAL*8 A(50,20), X(20), Y(20), alpha
  INCX = 1
  LDA = 50
  N = 20
  INCY = 1
  alpha = 1.0D0
  CALL DSYR2('U',N,alpha,X,INCX,Y,INCY,A,LDA)

  This FORTRAN code computes the rank-2 update of a real symmetric matrix A,
  given by A  =  x*transp(y)
   + y*transp(x) + A.  Only the upper-triangular part of A is stored.

CXML Home Page

Index of CXML Routines