The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PDL::SV - PDL subclass for keeping scalar data (like strings)

VERSION

version 0.0059_01

SYNOPSIS

    use PDL::SV ();
    
    my $p = PDL::SV->new( [ qw(foo bar) ] );

DESCRIPTION

This PDL::SV class stores array of scalar values. It can be used for vectors of strings.

While this class is a subclass of PDL, its internals are quite different from other normal PDL types. So basically what's not documented are not guarenteed to work.

METHODS / BASIC

These methods basically have similar behavior as PDL class's methods of same names.

slice

    slice(...)

dice

    dice(...)

glue

    $c = $a->glue($dim, $b, ...);

Glue two or more PDLs together along an arbitrary dimension. For now it only supports 1D PDL::SV piddles, and $dim has to be 0.

uniq

    uniq()

BAD values are not considered unique and are ignored.

uniqind()

Return the indices of all uniq elements of a piddle.

sever

    sever()

set

    set(@position, $value)

at

    at(@position)

unpdl

    unpdl()

list

    list()

copy

    copy()

inplace

    inplace()

where

    where($mask)

METHODS / BAD VALUE

These methods basically have similar behavior as PDL class's methods of same names.

isbad

    isbad()

isgood

    isgood()

ngood

    ngood()

nbad

    nbad()

setbadif

    setbadif($mask)

setbadtoval

    setbadtoval($val)

Cannot be run inplace.

METHODS / ADDITIONAL

These methods exist not in PDL but only in this class.

match_regexp

    match_regexp($pattern)

Match against a plain a regular expression. Returns a piddle of the same dimension.

SEE ALSO

PDL

AUTHORS

  • Zakariyya Mughal <zmughal@cpan.org>

  • Stephan Loyd <sloyd@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014, 2019-2021 by Zakariyya Mughal, Stephan Loyd.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.