PDL::LinearAlgebra 0.03
Sponsored Links
PDL::LinearAlgebra 0.03 Ranking & Summary
File size:
0.12 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
850
Date added:
2007-06-27
Publisher:
Grégory Vanuxem
PDL::LinearAlgebra 0.03 description
PDL::LinearAlgebra Perl module contains linear algebra utils for PDL.
SYNOPSIS
use PDL::LinearAlgebra;
$a = random (100,100);
($U, $s, $V) = mdsvd($a);
This module provides a convenient interface to PDL::LinearAlgebra::Real and PDL::LinearAlgebra::Complex.
FUNCTIONS
setlaerror
Set action type when error is encountered, returns previous type. Available values are NO, WARN and BARF (predefined constants). If, for example, in computation of the inverse, singularity is detected, the routine can silently return values from computation (see manuals), warn about singularity or barf. BARF is the default value.
$a = sequence(5,5);
$err = setlaerror(NO);
($inv, $info)= minv($a);
if ($info){
# Change the diagonal (the inverse doesnt exist but its an example)
$a->diagonal(0,1)+=1e-8;
($inv, $info)= minv($a);
}
if ($info){
print "Cant compute the inversen";
}
else{
print "Inverse of $a is $inv";
}
setlaerror($err);
getlaerror
Get error type.
0 => NO,
1 => WARN,
2 => BARF
t
PDL = t(PDL, SCALAR(conj))
conj : Conjugate Transpose = 1 | Transpose = 0, default = 1;
Convenient function for transposing real or complex 2D array(s). For PDL::Complex, if conj is true returns conjugate transpose array(s) and doesnt support dataflow. Supports threading.
issym
PDL = issym(PDL, SCALAR|PDL(tol),SCALAR(hermitian))
tol : tolerance value, default: 1e-8 for double else 1e-5
hermitian : Hermitian = 1 | Symmetric = 0, default = 1;
Check symmetricity/Hermitianicity of matrix. Supports threading.
diag
Return i-th diagonal if matrix in entry or matrix with i-th diagonal with entry. I-th diagonal returned flows data back&forth. Can be used as lvalue subs if your perl supports it. Supports threading.
PDL = diag(PDL, SCALAR(i), SCALAR(vector)))
i : i-th diagonal, default = 0
vector : create diagonal matrices by threading over row vectors, default = 0
my $a = random(5,5);
my $diag = diag($a,2);
# If your perl support lvaluable subroutines.
$a->diag(-2) .= pdl(1,2,3);
# Construct a (5,5,5) PDL (5 matrices) with
# diagonals from row vectors of $a
$a->diag(0,1)
tritosym
Return symmetric or Hermitian matrix from lower or upper triangular matrix. Supports inplace and threading. Uses tricpy or ctricpy from Lapack.
PDL = tritosym(PDL, SCALAR(uplo), SCALAR(conj))
uplo : UPPER = 0 | LOWER = 1, default = 0
conj : Hermitian = 1 | Symmetric = 0, default = 1;
# Assume $a is symmetric triangular
my $a = random(10,10);
my $b = tritosym($a);
positivise
Return entry pdl with changed sign by row so that average of positive sign > 0. In other words thread among dimension 1 and row = -row if Sum(sign(row)) < 0. Works inplace.
my $a = random(10,10);
$a -= 0.5;
$a->xchg(0,1)->inplace->positivise;
mcrossprod
Compute the cross-product of two matrix: A x B. If only one matrix is given, take B to be the same as A. Supports threading. Uses crossprod or ccrossprod.
PDL = mcrossprod(PDL(A), (PDL(B))
my $a = random(10,10);
my $crossproduct = mcrossprod($a);
mrank
Compute the rank of a matrix, using a singular value decomposition. from Lapack.
SCALAR = mrank(PDL, SCALAR(TOL))
TOL: tolerance value, default : mnorm(dims(PDL),inf) * mnorm(PDL) * EPS
my $a = random(10,10);
my $b = mrank($a, 1e-5);
mnorm
Compute norm of real or complex matrix Supports threading.
PDL(norm) = mnorm(PDL, SCALAR(ord));
ord :
0|inf : Infinity norm
1|one : One norm
2|two : norm 2 (default)
3|fro : frobenius norm
my $a = random(10,10);
my $norm = mnrom($a);
mdet
Compute determinant of a general square matrix using LU factorization. Supports threading. Uses getrf or cgetrf from Lapack.
PDL(determinant) = mdet(PDL);
my $a = random(10,10);
my $det = mdet($a);
mposdet
Compute determinant of a symmetric or Hermitian positive definite square matrix using Cholesky factorization. Supports threading. Uses potrf or cpotrf from Lapack.
(PDL, PDL) = mposdet(PDL, SCALAR)
SCALAR : UPPER = 0 | LOWER = 1, default = 0
my $a = random(10,10);
my $det = mposdet($a);
mcond
Compute the condition number (two-norm) of a general matrix.
The condition number (two-norm) is defined:
norm (a) * norm (inv (a)).
Uses a singular value decomposition. Supports threading.
PDL = mcond(PDL)
my $a = random(10,10);
my $cond = mcond($a);
mrcond
Estimate the reciprocal condition number of a general square matrix using LU factorization in either the 1-norm or the infinity-norm.
The reciprocal condition number is defined:
1/(norm (a) * norm (inv (a)))
Supports threading.
PDL = mrcond(PDL, SCALAR(ord))
ord :
0 : Infinity norm (default)
1 : One norm
my $a = random(10,10);
my $rcond = mrcond($a,1);
morth
Return an orthonormal basis of the range space of matrix A.
PDL = morth(PDL(A), SCALAR(tol))
tol : tolerance for determining rank, default: 1e-8 for double else 1e-5
my $a = random(10,10);
my $ortho = morth($a, 1e-8);
mnull
Return an orthonormal basis of the null space of matrix A.
PDL = mnull(PDL(A), SCALAR(tol))
tol : tolerance for determining rank, default: 1e-8 for double else 1e-5
my $a = random(10,10);
my $null = mnull($a, 1e-8);
minv
Compute inverse of a general square matrix using LU factorization. Supports inplace and threading. Uses getrf and getri or cgetrf and cgetri from Lapack and return inverse, info in array context.
PDL(inv) = minv(PDL)
my $a = random(10,10);
my $inv = minv($a);
mtriinv
Compute inverse of a triangular matrix. Supports inplace and threading. Uses trtri or ctrtri from Lapack. Returns inverse, info in array context.
(PDL, PDL(info))) = mtriinv(PDL, SCALAR(uplo), SCALAR|PDL(diag))
uplo : UPPER = 0 | LOWER = 1, default = 0
diag : UNITARY DIAGONAL = 1, default = 0
# Assume $a is upper triangular
my $a = random(10,10);
my $inv = mtriinv($a);
SYNOPSIS
use PDL::LinearAlgebra;
$a = random (100,100);
($U, $s, $V) = mdsvd($a);
This module provides a convenient interface to PDL::LinearAlgebra::Real and PDL::LinearAlgebra::Complex.
FUNCTIONS
setlaerror
Set action type when error is encountered, returns previous type. Available values are NO, WARN and BARF (predefined constants). If, for example, in computation of the inverse, singularity is detected, the routine can silently return values from computation (see manuals), warn about singularity or barf. BARF is the default value.
$a = sequence(5,5);
$err = setlaerror(NO);
($inv, $info)= minv($a);
if ($info){
# Change the diagonal (the inverse doesnt exist but its an example)
$a->diagonal(0,1)+=1e-8;
($inv, $info)= minv($a);
}
if ($info){
print "Cant compute the inversen";
}
else{
print "Inverse of $a is $inv";
}
setlaerror($err);
getlaerror
Get error type.
0 => NO,
1 => WARN,
2 => BARF
t
PDL = t(PDL, SCALAR(conj))
conj : Conjugate Transpose = 1 | Transpose = 0, default = 1;
Convenient function for transposing real or complex 2D array(s). For PDL::Complex, if conj is true returns conjugate transpose array(s) and doesnt support dataflow. Supports threading.
issym
PDL = issym(PDL, SCALAR|PDL(tol),SCALAR(hermitian))
tol : tolerance value, default: 1e-8 for double else 1e-5
hermitian : Hermitian = 1 | Symmetric = 0, default = 1;
Check symmetricity/Hermitianicity of matrix. Supports threading.
diag
Return i-th diagonal if matrix in entry or matrix with i-th diagonal with entry. I-th diagonal returned flows data back&forth. Can be used as lvalue subs if your perl supports it. Supports threading.
PDL = diag(PDL, SCALAR(i), SCALAR(vector)))
i : i-th diagonal, default = 0
vector : create diagonal matrices by threading over row vectors, default = 0
my $a = random(5,5);
my $diag = diag($a,2);
# If your perl support lvaluable subroutines.
$a->diag(-2) .= pdl(1,2,3);
# Construct a (5,5,5) PDL (5 matrices) with
# diagonals from row vectors of $a
$a->diag(0,1)
tritosym
Return symmetric or Hermitian matrix from lower or upper triangular matrix. Supports inplace and threading. Uses tricpy or ctricpy from Lapack.
PDL = tritosym(PDL, SCALAR(uplo), SCALAR(conj))
uplo : UPPER = 0 | LOWER = 1, default = 0
conj : Hermitian = 1 | Symmetric = 0, default = 1;
# Assume $a is symmetric triangular
my $a = random(10,10);
my $b = tritosym($a);
positivise
Return entry pdl with changed sign by row so that average of positive sign > 0. In other words thread among dimension 1 and row = -row if Sum(sign(row)) < 0. Works inplace.
my $a = random(10,10);
$a -= 0.5;
$a->xchg(0,1)->inplace->positivise;
mcrossprod
Compute the cross-product of two matrix: A x B. If only one matrix is given, take B to be the same as A. Supports threading. Uses crossprod or ccrossprod.
PDL = mcrossprod(PDL(A), (PDL(B))
my $a = random(10,10);
my $crossproduct = mcrossprod($a);
mrank
Compute the rank of a matrix, using a singular value decomposition. from Lapack.
SCALAR = mrank(PDL, SCALAR(TOL))
TOL: tolerance value, default : mnorm(dims(PDL),inf) * mnorm(PDL) * EPS
my $a = random(10,10);
my $b = mrank($a, 1e-5);
mnorm
Compute norm of real or complex matrix Supports threading.
PDL(norm) = mnorm(PDL, SCALAR(ord));
ord :
0|inf : Infinity norm
1|one : One norm
2|two : norm 2 (default)
3|fro : frobenius norm
my $a = random(10,10);
my $norm = mnrom($a);
mdet
Compute determinant of a general square matrix using LU factorization. Supports threading. Uses getrf or cgetrf from Lapack.
PDL(determinant) = mdet(PDL);
my $a = random(10,10);
my $det = mdet($a);
mposdet
Compute determinant of a symmetric or Hermitian positive definite square matrix using Cholesky factorization. Supports threading. Uses potrf or cpotrf from Lapack.
(PDL, PDL) = mposdet(PDL, SCALAR)
SCALAR : UPPER = 0 | LOWER = 1, default = 0
my $a = random(10,10);
my $det = mposdet($a);
mcond
Compute the condition number (two-norm) of a general matrix.
The condition number (two-norm) is defined:
norm (a) * norm (inv (a)).
Uses a singular value decomposition. Supports threading.
PDL = mcond(PDL)
my $a = random(10,10);
my $cond = mcond($a);
mrcond
Estimate the reciprocal condition number of a general square matrix using LU factorization in either the 1-norm or the infinity-norm.
The reciprocal condition number is defined:
1/(norm (a) * norm (inv (a)))
Supports threading.
PDL = mrcond(PDL, SCALAR(ord))
ord :
0 : Infinity norm (default)
1 : One norm
my $a = random(10,10);
my $rcond = mrcond($a,1);
morth
Return an orthonormal basis of the range space of matrix A.
PDL = morth(PDL(A), SCALAR(tol))
tol : tolerance for determining rank, default: 1e-8 for double else 1e-5
my $a = random(10,10);
my $ortho = morth($a, 1e-8);
mnull
Return an orthonormal basis of the null space of matrix A.
PDL = mnull(PDL(A), SCALAR(tol))
tol : tolerance for determining rank, default: 1e-8 for double else 1e-5
my $a = random(10,10);
my $null = mnull($a, 1e-8);
minv
Compute inverse of a general square matrix using LU factorization. Supports inplace and threading. Uses getrf and getri or cgetrf and cgetri from Lapack and return inverse, info in array context.
PDL(inv) = minv(PDL)
my $a = random(10,10);
my $inv = minv($a);
mtriinv
Compute inverse of a triangular matrix. Supports inplace and threading. Uses trtri or ctrtri from Lapack. Returns inverse, info in array context.
(PDL, PDL(info))) = mtriinv(PDL, SCALAR(uplo), SCALAR|PDL(diag))
uplo : UPPER = 0 | LOWER = 1, default = 0
diag : UNITARY DIAGONAL = 1, default = 0
# Assume $a is upper triangular
my $a = random(10,10);
my $inv = mtriinv($a);
PDL::LinearAlgebra 0.03 Screenshot
PDL::LinearAlgebra 0.03 Keywords
PDL
LinearAlgebra
1e
LinearAlgebra Perl
LinearAlgebra 0.03
LU
square matrix
Perl module
linear algebra
Condition number
scalar
0
matrix
random
1
threading
Bookmark PDL::LinearAlgebra 0.03
PDL::LinearAlgebra 0.03 Copyright
WareSeeker periodically updates pricing and software information of PDL::LinearAlgebra 0.03 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of PDL::LinearAlgebra 0.03 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
random acts of kindness
scalar field
matrix mris
threading dies
eyebrow threading
toyota matrix
random acts of kindness ideas
linearalgebratoolkit
scalars and vectors
matrix rayne
random lengths
scalar core international
threading inserts
threading eyebrows
scalar product
matrix multiplication
random facts
linear algebra calculator
Related Software
PDL::LinearAlgebra::Trans is a Linear Algebra based transcendental functions for PDL. Free Download
PDL::LinearAlgebra::Complex is a PDL interface to the lapack linear algebra programming library (complex number). Free Download
PDL::Internals is a Perl module that contains a description of some aspects of the current internals. Free Download
PDL::Opt::NonLinear is a Perl module with non linear optimization routines. Free Download
PerlIO::locale is a PerlIO layer to use the encoding of the current locale. Free Download
PDL::Parallel::MPI Perl module contains routines to allow PDL objects to be moved around on parallel systems using the MPI lib. Free Download
App::Manager is a Perl module for installing, managing and uninstalling software packages. Free Download
PDL::GSL::INTEG is a PDL interface to numerical integration routines in GSL. Free Download
Latest Software
Popular Software
Favourite Software