.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "VectorValued 3pm" .TH VectorValued 3pm "2022-10-20" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PDL::VectorValued \- Utilities for vector\-valued PDLs .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use PDL; \& use PDL::VectorValued; \& \& ##\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& ## ... stuff happens .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" PDL::VectorValued provides generalizations of some elementary \s-1PDL\s0 functions to higher-order PDLs which treat vectors as \*(L"data values\*(R". .SH "ALIASES" .IX Header "ALIASES" To facilitate incorporation of selected vector-valued functions into the \s-1PDL\s0 core, the \s-1PDL:PP\-, XS\-, C\-,\s0 and perl-level functions defined by this module in the \f(CW\*(C`PDL::VectorValued::Utils\*(C'\fR package namespace all carry a \f(CW\*(C`vv_\*(C'\fR prefix as of PDL::VectorValued v1.0.19 Prior to v1.0.19, many of these functions (e.g. \f(CW\*(C`cmpvec()\*(C'\fR) were defined by this module without a \f(CW\*(C`vv_\*(C'\fR prefix. .PP For PDL::VectorValued >= v1.0.19 and \s-1PDL\s0 > v2.079, most vector-valued functions are expected to be defined in the \s-1PDL\s0 core. For such \*(L"moving\*(R" functions \&\f(CW\*(C`FUNC\*(C'\fR, the \s-1PDL\s0 core implementations will be imported into the \f(CW\*(C`PDL::VectorValued\*(C'\fR namespace as both \f(CW\*(C`FUNC\*(C'\fR and \f(CW\*(C`vv_FUNC\*(C'\fR, clobbering any local implementation from the \f(CW\*(C`PDL::VectorValued::Utils\*(C'\fR namespace. Local implementations \&\f(CW\*(C`vv_FUNC\*(C'\fR which were previously defined and exported as \f(CW\*(C`FUNC\*(C'\fR or for which no binding for \f(CW*PDL::FUNC\fR exists will be bound to both \f(CW*PDL::VectorValued::FUNC\fR and \f(CW*PDL::FUNC\fR, and exported by default, for backwards-compatibility. .PP Functions expected to move to the \s-1PDL\s0 core are: .IP "\(bu" 4 New code should use \f(CW\*(C`FUNC()\*(C'\fR or \f(CW\*(C`PDL::FUNC()\*(C'\fR. .IP "\(bu" 4 Backwards-compatible code can use \f(CW\*(C`FUNC()\*(C'\fR or \f(CW\*(C`PDL::VectorValued::FUNC()\*(C'\fR. .IP "\(bu" 4 Direct use of \f(CW\*(C`PDL::VectorValued::Utils::vv_FUNC()\*(C'\fR is deprecated. .IP "\(bu" 4 Direct use of \f(CW\*(C`PDL::VectorValued::Utils::FUNC()\*(C'\fR is likely broken as of PDL::VectorValued v1.0.19. .SH "FUNCTIONS" .IX Header "FUNCTIONS" .SS "vv_uniqvec" .IX Subsection "vv_uniqvec" .Vb 1 \& Signature: (v(N,M); [o]vu(N,MU)) .Ve .PP Drop-in replacement for broken \fBuniqvec()\fR which uses \fBvv_qsortvec()\fR. Otherwise copied from PDL::Primitive::primitive.pd. .PP See also: PDL::VectorValued::Utils::vv_qsortvec, PDL::Primitive::uniqvec. .SH "Higher-Order Run-Length Encoding and Decoding" .IX Header "Higher-Order Run-Length Encoding and Decoding" The following functions generalize the builtin \s-1PDL\s0 functions \fBrle()\fR and \fBrld()\fR for higher-order \*(L"values\*(R". .PP See also: \&\fBPDL::VectorValued::Utils::vv_rlevec()\fR, \fBPDL::VectorValued::Utils::vv_rldvec()\fR. .SS "vv_rleND" .IX Subsection "vv_rleND" .Vb 1 \& Signature: (data(@vdims,N); int [o]counts(N); [o]elts(@vdims,N)) .Ve .PP Run-length encode a set of (sorted) n\-dimensional values. .PP Generalization of \fBrle()\fR and \fBvv_rlevec()\fR: given set of values \f(CW$data\fR, generate a vector \f(CW$counts\fR with the number of occurrences of each element (where an \*(L"element\*(R" is a matrix of dimensions \f(CW@vdims\fR ocurring as a sequential run over the final dimension in \f(CW$data\fR), and a set of vectors \f(CW$elts\fR containing the elements which begin a run. Really just a wrapper for \fBclump()\fR and \fBrlevec()\fR. .PP See also: PDL::Slices::rle, PDL::Ngrams::VectorValued::Utils::vv_rlevec. .SS "vv_rldND" .IX Subsection "vv_rldND" .Vb 1 \& Signature: (int counts(N); elts(@vdims,N); [o]data(@vdims,N);) .Ve .PP Run-length decode a set of (sorted) n\-dimensional values. .PP Generalization of \fBrld()\fR and \fBrldvec()\fR: given a vector $\fBcounts()\fR of the number of occurrences of each \f(CW@vdims\fR\-dimensioned element, and a set $\fBelts()\fR of \f(CW@vdims\fR\-dimensioned elements, run-length decode to $\fBdata()\fR. .PP Really just a wrapper for \fBclump()\fR and \fBrldvec()\fR. .PP See also: PDL::Slices::rld, PDL::VectorValued::Utils::rldvec .SH "Datatype Utilities" .IX Header "Datatype Utilities" .SS "vv_indx" .IX Subsection "vv_indx" .Vb 1 \& Signature: vv_indx() .Ve .PP Returns PDL::Type subclass used for indices. If built with \s-1PDL\s0 < v2.007, this should return \f(CW\*(C`PDL::long\*(C'\fR, otherwise \f(CW\*(C`PDL::indx\*(C'\fR. .SS "Low-Level Functions" .IX Subsection "Low-Level Functions" Some additional low-level functions are provided in the PDL::VectorValued::Utils package. See PDL::VectorValued::Utils for details. .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" perl by Larry Wall. .SH "AUTHOR" .IX Header "AUTHOR" Bryan Jurish .PP \&\s-1PDL\s0 by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2007\-2022, Bryan Jurish. All rights reserved. .PP This package is free software. You may redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperl\fR\|(1), \s-1\fBPDL\s0\fR\|(3perl), \fBPDL::VectorValued::Utils\fR\|(3perl)