Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    PDL::Reduce 2.3.2

    Download button

    No screenshots available
    Downloads: 307  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Christian Soeller | More programs
    Perl Artistic License / FREE
    July 14th, 2007, 21:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    PDL::Reduce description

    PDL::Reduce is Perl module that helps to reduce functions for PDL.

    PDL::Reduce is Perl module that helps to reduce functions for PDL.

    Many languages have a reduce function used to reduce the rank of an N-D array by one. It works by applying a selected operation along a specified dimension. This module implements such a function for PDL by providing a simplified interface to the existing projection functions (e.g. sumover, maximum, average, etc).

    SYNOPSIS

    use PDL::Reduce;
    $a = sequence 5,5;
    # reduce by adding all
    # elements along 2nd dimension
    $b = $a->reduce('add',1);
    @ops = $a->canreduce; # return a list of all allowed operations

    FUNCTIONS

    reduce

    reduce dimension of piddle by one by applying an operation along the specified dimension

    $a = sequence 5,5;
    # reduce by adding all
    # elements along 2nd dimension
    $b = $a->reduce('add',1);
    $b = $a->reduce('plus',1);
    $b = $a->reduce('+',1); # three ways to do the same thing
    [ As an aside: if you are familiar with threading you will see that this is actually the same as
    $b = $a->mv(1,0)->sumover
    ]

    NOTE: You should quote the name of the operation (1st arg) that you want reduce to perform. This is important since some of the names are identical to the names of the actual PDL functions which might be imported into your namespace. And you definitely want a string as argument, not a function invocation! For example, this will probably fail:

    $b = $a->reduce(avg,1); # gives an error from invocation of 'avg'

    Rather use

    $b = $a->reduce('avg',1);

    reduce provides a simple and unified interface to the projection functions and makes people coming from other data/array languages hopefully feel more at home.

    $result = $pdl->reduce($operation [,$dim]);

    reduce applies the named operation along the specified dimension reducing the input piddle dimension by one. If the dimension is omitted the operation is applied along the first dimension. To get a list of valid operations see canreduce.

    canreduce

    return list of valid named reduce operations Some common operations can be accessed using a number of names, e.g. '+', add and plus all sum the elements along the chosen dimension.

    @ops = PDL->canreduce;

    This list is useful if you want to make sure which operations can be used with reduce.

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    reduce functions | PDL functions | Perl module | PDL::Reduce | reduce | PDL

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM