.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 "Math::NumSeq::PlanePathN 3pm" .TH Math::NumSeq::PlanePathN 3pm "2021-01-23" "perl v5.32.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" Math::NumSeq::PlanePathN \-\- sequence of N values from PlanePath module .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use Math::NumSeq::PlanePathN; \& my $seq = Math::NumSeq::PlanePathN\->new (planepath => \*(AqSquareSpiral\*(Aq, \& line_type => \*(AqX_axis\*(Aq); \& my ($i, $value) = $seq\->next; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module presents N values from a \f(CW\*(C`Math::PlanePath\*(C'\fR as a sequence. The default is the X axis, or the \f(CW\*(C`line_type\*(C'\fR parameter (a string) can choose among .PP .Vb 10 \& "X_axis" X axis (positive part) \& "Y_axis" Y axis (positive part) \& "X_neg" X negative axis \& "Y_neg" Y negative axis \& "Diagonal" leading diagonal X=i, Y=i \& "Diagonal_NW" north\-west diagonal X=\-i, Y=i \& "Diagonal_SW" south\-west diagonal X=\-i, Y=\-i \& "Diagonal_SE" south\-east diagonal X=i, Y=\-i \& "Depth_start" first N at depth=i \& "Depth_end" last N at depth=i .Ve .PP For example the \f(CW\*(C`SquareSpiral\*(C'\fR X axis starts i=0 with values 1, 2, 11, 28, 53, 86, etc. .PP \&\*(L"X_neg\*(R", \*(L"Y_neg\*(R", \*(L"Diagonal_NW\*(R", etc, on paths which don't traverse negative X or Y have just a single value from X=0,Y=0. .PP The behaviour on paths which visit only some of the points on the respective axis is unspecified as yet, as is behaviour on paths with repeat points, such as the \f(CW\*(C`DragonCurve\*(C'\fR. .SH "FUNCTIONS" .IX Header "FUNCTIONS" See \*(L"\s-1FUNCTIONS\*(R"\s0 in Math::NumSeq for behaviour common to all sequence classes. .ie n .IP """$seq = Math::NumSeq::PlanePathN\->new (key=>value,...)""" 4 .el .IP "\f(CW$seq = Math::NumSeq::PlanePathN\->new (key=>value,...)\fR" 4 .IX Item "$seq = Math::NumSeq::PlanePathN->new (key=>value,...)" Create and return a new sequence object. The options are .Sp .Vb 3 \& planepath string, name of a PlanePath module \& planepath_object PlanePath object \& line_type string, as described above .Ve .Sp \&\f(CW\*(C`planepath\*(C'\fR can be either the module part such as \*(L"SquareSpiral\*(R" or a full class name \*(L"Math::PlanePath::SquareSpiral\*(R". .ie n .IP """$value = $seq\->ith($i)""" 4 .el .IP "\f(CW$value = $seq\->ith($i)\fR" 4 .IX Item "$value = $seq->ith($i)" Return the N value at \f(CW$i\fR in the PlanePath. \f(CW$i\fR gives a position on the respective \f(CW\*(C`line_type\*(C'\fR, so the X,Y to lookup a \f(CW\*(C`$value=N\*(C'\fR is .Sp .Vb 10 \& X,Y line_type \& \-\-\-\-\- \-\-\-\-\-\-\-\-\- \& $i, 0 "X_axis" \& 0, $i "Y_axis" \& \-$i, 0 "X_neg" \& 0, \-$i "Y_neg" \& $i, $i "Diagonal" \& $i, \-$i "Diagonal_NW" \& \-$i, \-$i "Diagonal_SW" \& $i, \-$i "Diagonal_SE" .Ve .ie n .IP """$bool = $seq\->pred($value)""" 4 .el .IP "\f(CW$bool = $seq\->pred($value)\fR" 4 .IX Item "$bool = $seq->pred($value)" Return true if \f(CW$value\fR occurs in the sequence. .Sp This means \f(CW$value\fR is an integer N which is on the respective \&\f(CW\*(C`line_type\*(C'\fR, ie. that \f(CW\*(C`($path\->n_to_xy($value)\*(C'\fR is on the line type. .SH "SEE ALSO" .IX Header "SEE ALSO" Math::NumSeq, Math::NumSeq::PlanePathCoord, Math::NumSeq::PlanePathDelta .SH "HOME PAGE" .IX Header "HOME PAGE" .SH "LICENSE" .IX Header "LICENSE" Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Kevin Ryde .PP This file is part of Math-PlanePath. .PP Math-PlanePath is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. .PP Math-PlanePath is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with Math-PlanePath. If not, see .