.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 2024-03-07 "perl v5.38.2" "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 PDL functions to higher-order PDLs which treat vectors as "data values". .SH ALIASES .IX Header "ALIASES" To facilitate incorporation of selected vector-valued functions into the PDL core, the PDL:PP\-, XS\-, C\-, 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(CWcmpvec()\fR) were defined by this module without a \f(CW\*(C`vv_\*(C'\fR prefix. .PP For PDL::VectorValued >= v1.0.19 and PDL > v2.079, most vector-valued functions are expected to be defined in the PDL core. For such "moving" functions \&\f(CW\*(C`FUNC\*(C'\fR, the PDL 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 PDL core are: .IP \(bu 4 New code should use \f(CWFUNC()\fR or \f(CWPDL::FUNC()\fR. .IP \(bu 4 Backwards-compatible code can use \f(CWFUNC()\fR or \f(CWPDL::VectorValued::FUNC()\fR. .IP \(bu 4 Direct use of \f(CWPDL::VectorValued::Utils::vv_FUNC()\fR is deprecated. .IP \(bu 4 Direct use of \f(CWPDL::VectorValued::Utils::FUNC()\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 PDL functions \fBrle()\fR and \fBrld()\fR for higher-order "values". .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 "element" 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 PDL < 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 PDL 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), \fBPDL\fR\|(3perl), \fBPDL::VectorValued::Utils\fR\|(3perl)