PDL::LinearAlgebra::Complex

PDL::LinearAlgebra::Complex is a PDL interface to the lapack linear algebra programming library (complex number).
Download

PDL::LinearAlgebra::Complex Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Grgory Vanuxem
  • Publisher web site:
  • http://search.cpan.org/~ellipse/PDL-LinearAlgebra-0.06/Real/real.pd

PDL::LinearAlgebra::Complex Tags


PDL::LinearAlgebra::Complex Description

PDL::LinearAlgebra::Complex is a PDL interface to the lapack linear algebra programming library (complex number). PDL::LinearAlgebra::Complex is a PDL interface to the lapack linear algebra programming library (complex number).SYNOPSIS use PDL::Complex use PDL::LinearAlgebra::Complex; $a = r2C random (100,100); $s = r2C zeroes(100); $u = r2C zeroes(100,100); $v = r2C zeroes(100,100); $info = 0; $job = 0; cgesdd($a, $job, $info, $s , $u, $v);This module provide an interface to parts of the lapack library (complex number). These routine accept either float or double piddles.EODpp_defc("gesvd", HandleBad => 0, RedoDimsCode => '$SIZE(r) = $PDL(A)->ndims > 2 ? min($PDL(A)->dims, $PDL(A)->dims) : 1;', Pars => 'A(2,m,n); int jobu(); int jobvt(); s(r); U(2,p,q); VT(2,s,t); int info()', GenericTypes => , Code => generate_code ' integer lwork; char trau, travt; types(F) %{ extern int cgesvd_(char *jobu, char *jobvt, integer *m, integer *n, float *a, integer *lda, float *s, float *u, int *ldu, float *vt, integer *ldvt, float *work, integer *lwork, float *rwork, integer *info); float *rwork; float tmp_work; %} types(D) %{ extern int zgesvd_(char *jobz,char *jobvt, integer *m, integer *n, double *a, integer *lda, double *s, double *u, int *ldu, double *vt, integer *ldvt, double *work, integer *lwork, double *rwork, integer *info); double *rwork; double tmp_work; %} lwork = ($PRIV(__m_size) < $PRIV(__n_size)) ? 5*$PRIV(__m_size) : 5*$PRIV(__n_size); types(F) %{ rwork = (float *)malloc(lwork * sizeof(float)); %} types(D) %{ rwork = (double *)malloc(lwork * sizeof(double)); %} lwork = -1; switch ($jobu()) { case 1: trau = 'A'; break; case 2: trau = 'S'; break; case 3: trau = 'O'; break; default: trau = 'N'; } switch ($jobvt()) { case 1: travt = 'A'; break; case 2: travt = 'S'; break; case 3: travt = 'O'; break; default: travt = 'N'; } $TFD(cgesvd_,zgesvd_)( &trau, &travt, &$PRIV(__m_size), &$PRIV(__n_size), $P(A), &$PRIV(__m_size), $P(s), $P(U), &$PRIV(__p_size), $P(VT), &$PRIV(__s_size), &tmp_work, &lwork, rwork, $P(info)); lwork = (integer )tmp_work; { types(F) %{ float *work = (float *)malloc(2*lwork * sizeof(float)); %} types(D) %{ double *work = (double *)malloc(2*lwork * sizeof(double)); %} $TFD(cgesvd_,zgesvd_)( &trau, &travt, &$PRIV(__m_size), &$PRIV(__n_size), $P(A), &$PRIV(__m_size), $P(s), $P(U), &$PRIV(__p_size), $P(VT), &$PRIV(__s_size), work, &lwork, rwork, $P(info)); free(work); } free(rwork);',Doc=>' Requirements: · Perl


PDL::LinearAlgebra::Complex Related Software