Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.474.419 Times

PDL::Ufunc 2.4.3

  Date Added: June 07, 2010  |  Visits: 655

PDL::Ufunc

Report Broken Link
Printer Friendly Version


Product Homepage
Download (96 downloads)



PDL::Ufunc Perl module contains primitive ufunc operations for pdl. This module provides some primitive and useful functions defined using PDL::PP based on functionality of what are sometimes called ufuncs (for example NumPY and Mathematica talk about these). It collects all the functions generally used to reduce or accumulate along a dimension. These all do their job across the first dimension but by using the slicing functions you can do it on any dimension. The PDL::Reduce module provides an alternative interface to many of the functions in this module. SYNOPSIS use PDL::Ufunc; Project via $name to N-1 dimensions This function reduces the dimensionality of a piddle by one by taking the $name along the 1st dimension. By using xchg etc. it is possible to use any dimension. $a = $op($b); $spectrum = $op $image->xchg(0,1) $extras EOD } # sub: projectdocs() sub cumuprojectdocs { my $name = shift; my $op = shift; my $extras = shift; return <<EOD; Cumulative $name This function calculates the cumulative $name along the 1st dimension. By using xchg etc. it is possible to use any dimension. The sum is started so that the first element in the cumulative $name is the first element of the parameter. $a = $op($b); $spectrum = $op $image->xchg(0,1) $extras EOD } # sub: cumuprojectdocs() # its a bit unclear what to do with the comparison operators, # since the return value could be bad because all elements are bad, # which needs checking for since the bad value could evaluate to # true or false (eg if the user has set it to 0) # # by setting CopyBadStatusCode to , we stop the output piddle # from automatically being set bad if any of the input piddles are bad. # - we can set the flag within BadCode if necessary # # This may NOT be sensible. Only time, and comments, will tell... # my %over = ( sumover => { name => sum, op => +=, init => 0, }, prodover => { name => product, op => *=, init => 1, }, ); foreach my $func ( keys %over ) { # creates $func and cumu$func functions # and d$func and dcumu$func functions, which # perform the calculations in double precision my $name = $over{$func}{name}; my $op = $over{$func}{op}; my $init = $over{$func}{init}; pp_def( $func, HandleBad => 1, Pars => a(n); int+ [o]b();, Code => $GENERIC(b) tmp = . $init . ; loop(n) %{ tmp . $op . $a(); %} $b() = tmp;, BadCode => $GENERIC(b) tmp = . $init . ; int flag = 0; loop(n) %{ if ( $ISGOOD(a()) ) { tmp . $op . $a(); flag = 1; } %} if ( flag ) { $b() = tmp; } else { $SETBAD(b()); }, Doc => projectdocs( $name, $func, ), ); # as above, but in double precision pp_def( "d$func", HandleBad => 1, Pars => a(n); double [o]b();, Code => double tmp = . $init . ; loop(n) %{ tmp . $op . $a(); %} $b() = tmp;, BadCode => double tmp = . $init . ; int flag = 0; loop(n) %{ if ( $ISGOOD(a()) ) { tmp . $op . $a(); flag = 1; } %} if ( flag ) { $b() = tmp; } else { $SETBAD(b()); }, Doc => projectdocs( $name, "d$func", "Unlike L<$func|/$func>, the calculations are performed in doublen" . "precision." ), ); my $cfunc = "cumu${func}"; pp_def( $cfunc, HandleBad => 1, Pars => a(n); int+ [o]b(n);, Code => $GENERIC(b) tmp = . $init . ; loop(n) %{ tmp . $op . $a(); $b() = tmp; %}, BadCode => $GENERIC(b) tmp = . $init . ; loop(n) %{ if ( $ISBAD(a()) ) { $SETBAD(b()); } else { tmp . $op . $a(); $b() = tmp; } %}, Doc => cumuprojectdocs( $name, $cfunc, ), ); # as above but in double precision pp_def( "d$cfunc", HandleBad => 1, Pars => a(n); double [o]b(n);, Code => double tmp = . $init . ; loop(n) %{ tmp . $op . $a(); $b() = tmp; %}, BadCode => double tmp = . $init . ; loop(n) %{ if ( $ISBAD(a()) ) { $SETBAD(b()); } else { tmp . $op . $a(); $b() = tmp; } %}, Doc => cumuprojectdocs( $name, $cfunc, "Unlike L , the calculations are performed in doublen" . "precision." ), );.

Requirements: No special requirements
Platforms: Linux
Keyword: Badcode Func Generic Handlebad Init Libraries Op Pdl Pdlufunc Perl Module Setbad Tmp Ufunc Perl
Users rating: 0/10

License: Freeware Size: 2.1 MB
USER REVIEWS
More Reviews or Write Review


PDL::UFUNC RELATED
Libraries  -  PDL::Primitive 2.4.3
PDL::Primitive Perl module contains primitive operations for pdl. This module provides some primitive and useful functions defined using PDL::PP and able to use the new indexing tricks. See PDL::Indexing for how to use indices creatively. For...
2.1 MB  
Libraries  -  PDL::NiceSlice 2.4.3
PDL::NiceSlice Perl module contains a nicer slicing syntax for PDL. SYNOPSYS use PDL::NiceSlice; $a(1:4) .= 2; # concise syntax for ranges print $b((0),1:$end); # use variables in the slice expression $a->xchg(0,1)->(($pos-1)) .= 0; #...
2.1 MB  
Libraries  -  PDL::Indexing 2.4.3
PDL::Indexing Perl module contains a tutorial on how to index piddles. This manpage should serve as a first tutorial on the indexing and threading features of PDL. This manpage is still in alpha development and not yet complete. "Meta"...
2.1 MB  
Libraries  -  PDL::MatrixOps 2.4.3
PDL::MatrixOps Perl module contains some useful Matrix operations. SYNOPSIS $inv = $a->inv; $det = $a->det; ($lu,$perm,$par) = $a->lu_decomp; $x = lu_backsub($lu,$perm,$b); # solve $a x $x = $b PDL::MatrixOps is PDLs built-in matrix...
2.1 MB  
Security Tools  -  OpenSC 0.11.3
OpenSC consists of tools and libraries and a PKCS#11 module to use smart cards and initialize blank smart cards. OpenSC project supports many commercial smart cards with filesystems, many national ID cards (read only), and some Java Card cards...
1.2 MB  
Libraries  -  PDL::Image2D 2.4.3
PDL::Image2D is a Perl module that contains miscellaneous 2D image processing functions. For large kernels, using a FFT routine, such as fftconvolve() in PDL::FFT, will be quicker. $new = conv2d $old, $kernel, {OPTIONS} $smoothed = conv2d...
2.1 MB  
Libraries  -  PDL::Graphics::TriD 2.4.3
PDL::Graphics::TriD is a PDL 3D interface. SYNOPSIS use PDL::Graphics::TriD; # After each graph, let the user rotate is and # wait for him to press q, then make new graph line3d($coords); # $coords = (3,n,...) line3d($coords,$colors); #...
2.1 MB  
Libraries  -  PDL::Parallel::MPI 0.02
PDL::Parallel::MPI Perl module contains routines to allow PDL objects to be moved around on parallel systems using the MPI library. SYNOPSIS use PDL; use PDL::Parallel::MPI; mpirun(2); MPI_Init(); $rank = get_rank(); $a=$rank * ones(2);...
133.12 KB  
Libraries  -  PDL::Transform::Cartography 2.4.3
PDL::Transform::Cartography Perl module contains useful cartographic projections. SYNOPSIS # make a Mercator map of Earth use PDL::Transform::Cartography; $a = earth_coast(); $a = graticule(10,2)->glue(1,$a); $t = t_mercator; $w =...
2.1 MB  
Libraries  -  Lemonldap::Handlers::Generic 3.1.1
Lemonldap::Handlers::Generic is a Perl extension for Lemonldap sso system. Lemonldap::Handlers::Generic4a2 - Handler for Apache2 Lemonldap SSO system SYNOPSIS In httpd.conf ..... perltranshandler Lemonldap::Handlers::Generic4a2 ........
24.58 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB