Covers basic piddle-creation routines like sequence, rvals, and logxvals to name a random few. Also covers hist and transpose.
Explains a large collection of built-in functions which, given an N-dimension piddle, will create a piddle with N-1 dimensions.
PDL came of age right around the turn of the millennium and NiceSlice came on the scene slightly after that. Some of the docs still havent caught up. NiceSlice is the modern way to slice and dice your piddles. Read the Synopsis, then scroll down to The New Slicing Syntax. After youve read to the bottom, return to and read the stuff at the top.
Defines a whole slew of useful built-in functions. These are the sorts of things that beginners are likely to write to the list and say, How do I do xxx? You would be well on your way to learning the ropes after youve gotten through this document.
Selections from PDL::Core
Like PDL::Primitive, defines a large set of useful functions. Unfortunately, some of the functions are quite esoteric, but are mixed in with the rest of the simple and easy ones. Skim the whole document, skipping over the complicated functions for now. I would point out in particular the function approx.
o The perldl or pdl2 Shell
The Perldl Shell is a REPL (Read-Evaluate-Print-Loop, in other words, a prompt or shell) that allows you to work with PDL (or any Perl, for that matter) in real time, loading data from files, plotting, manipulating... Anything you can do in a script, you can do in the PDL Shell, with instant feedback!
The sorts of modules that youll likely use on a normal basis in scripts or from within the perldl shell. Some of these modules you may never use, but you should still be aware that they exist, just in case you need their functionality.
In addition to explaining the original slicing and dicing functions - for which you can usually use PDL::NiceSlice - this also covers many dimension-handling functions such as mv, xchg, and reorder. This also thoroughly documents the range function, which can be very powerful, and covers a number of internal functions, which can probably be skipped.
This covers a lot of the deeper conceptual ground that youll need to grasp to really use PDL to its full potential. It gets more complex as you go along, so dont be troubled if you find yourself loosing interest half way through. However, reading this document all the way through will bring you much closer to PDL enlightenment.
o PDL::IO o PDL::Tips
A collection of some of Tuomass ideas for making good use of PDL.
Explains what bad values are and how and why they are implemented.
o Selections from Inline::Pdlpp
Although writing PDL::PP code is considered an Advanced topic, and is covered in the next section, you should be aware that it is possible (and surprisingly simple) to write PDL-aware code. You neednt read the whole thing at this point, but to get some feel for how it works, you should read everything up through the first example. A copy of this documentation is contained in PDL::PP-Inline.
Explains how to subclass a piddle object.
This was discussed in the Preface. It is an automatically generated file that lists all of the PDL modules on your computer. There are many modules that may be on your machine but which are not documented here, such as bindings to the FFTW library, or GSL. Give it a read!
Complex number support. No, PDL does not have complex number support built into the core, but this should help you out.
o PDL::FFT o GSL
PDL does not have bindings for every sub-library in the GNU Scientific Library, but it has quite a few. If you have GSL installed on your machine then chances are decent that your PDL has the GSL bindings. For a full list of the GSL bindings, check PDL::Index.
o PDL::Func o PDL::Bad
Includes some basic bad-value functionality, including functions to query if a piddle has bad values (isbad) and functions to set certain elements as bad (setbadat and setbadif). Among other places, bad values are used in PDL::Graphics::PLplots xyplot to make a gap in a line plot.
A cool module that allows you to tie a Perl array to a collection of files on your disk, which will be loaded into and out of memory as piddles. If you find yourself writing scripts to process many data files, especially if that data processing is not necessarily in sequential order, you should consider using PDL::DiskCache.
o PDL::Char o PDL::Image2D
A whole collection of methods for manipulating images whose image data are stored in a piddle. These include methods for convolutions (smoothing), polygon fills, scaling, rotation, and warping, among others.
Contains a few functions that are conceptually related to image processing, but which can be defined for higher-dimensional data. For examples this module defines high-dimensional convolution and interpolation, among others.
o PDL::ImageRGB o PDL::Transform
Creates the transform class, which allows you to create various coordinate transforms. For example, if you data is a collection of Cartesian coordinates, you could create a transform object to convert them to Spherical-Polar coordinates (although many such standard coordinate transformations are predefined for you, in this case its called t_spherical).
This package states that it implements the commonly used simplex optimization algorithm. Im going to assume that if you need this algorithm then you already know what it is.
A collection of fairly standard math functions, like the inverse trigonometric functions, hyperbolic functions and their inverses, and others. This module is included in the standard call to use PDL, but not in the Lite versions.
Provides a few functions that use the standard mathematical Matrix notation of row-column indexing rather than the PDL-standard column-row. It appears that this module has not been heavily tested with other modules, so although it should work with other modules, dont be surprised if something breaks when you use it (and feel free to offer any fixes that you may develop).
Provides many standard matrix operations for piddles, such as computing eigenvalues, inverting square matrices, LU-decomposition, and solving a system of linear equations. Though it is not built on PDL::Matrix, it should generally work with that module. Also, the methods provided by this module do not depend on external libraries such as Slatec or GSL.
Enables Matlab-style autoloading. When you call an unknown function, instead of complaining and croaking, PDL will go hunt around in the directories you specify in search of a like-named file. Particularly useful when used with the Perldl Shell.
o PDL::Dbg o PDL::Options
Suppose you define a powerful, versatile function. Chances are good that youll accept the arguments in the form of a hash or hashref. Now you face the problem of processing that hashref. PDL::Options assists you in writing code to process those options. (Youd think Perl would have tons of these sorts of modules lying around, but I couldnt find any.) Note this module does not depend on PDL for its usage or installation.
Ever fired-up the perldl shell just to look up the help for a particular function? You can use pdldoc instead. This shell script extracts information from the help index without needing to start the perldl shell.
The sorts of modules and documentation that youll use if you write modules that use PDL, or if you work on PDL maintenance. These modules can be difficult to use, but enable you to tackle some of your harder problems.
o PDL::Lite, PDL::LiteF
Lite-weight replacements for use PDL, from the standpoint of namespace pollution and load time.
This was mentioned earlier. Before you begin reading about PDL::PP (next), you should remind yourself about how to use this. Inline::Pdlpp will help you experiment with PDL::PP without having to go through the trouble of building a module and constructing makefiles (but see PDL::pptemplate for help on that).
The PDL Pre-Processor, which vastly simplifies making you C or Fortran code play with Perl and piddles. Most of PDLs basic functionality is written using PDL::PP, so if youre thinking about how you might integrate some numerical library written in C, look no further.
A script that automates the creation of modules that use PDL::PP, which should make your life as a module author a bit simpler.
Allows you to call functions using external shared libraries. This is an alternative to using PDL::PP. The major difference between PDL::PP and PDL::CallExt is that the former will handle threading over implicit thread dimensions for you, whereas PDL::CallExt simply calls an external function. PDL::PP is generally the recommended way to interface your code with PDL, but it wouldnt be Perl if there wasnt another way to do it.
o PDL::Config o PDL::Doc
Explanation of the PDL documentation conventions, and an interface to the PDL Documentation parser. Following these guidelines when writing documentation for PDL functions will ensure that your wonderful documentation is accessible from the perldl shell and from calls to barf. (Did you notice that barf used your documentation? Time to reread PDL::Core...)
A simple replacement for the standard Exporter module. The only major difference is that the default imported modules are those marked :Func.
Defines some useful functions for getting a piddles type, as well as getting information about that type.
Simply defines the scalar $PDL::Version::Version with the current version of PDL, as defined in PDL.pm. This is most useful if you distribute your own module on CPAN, use PDL::Lite or PDL::LiteF and want to make sure that your users have a recent-enough version of PDL. Since the variable is defined in PDL.pm, you dont need this module if you use PDL.
Provides some decently useful functions that are pretty much only needed by the PDL Porters.
Explains how to make a piddle by hand, from Perl or your C source code, using the PDL API.
Explains the nitty-gritty of the PDL data structures. After reading this (a few times :), you should be able to create a piddle completely from scratch (i.e. without using the PDL API). Put a little differently, if you want to understand how PDL::PP works, youll need to read this.
Copyright 2010 David Mertens (firstname.lastname@example.org). You can distribute and/or modify this document under the same terms as the current Perl license.
|perl v5.20.3||COURSE (1)||2015-08-12|