.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" 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 turned on, 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 "Set::Infinite::Arithmetic 3pm" .TH Set::Infinite::Arithmetic 3pm "2016-04-16" "perl v5.22.1" "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 .SS "\s-1NAME\s0" .IX Subsection "NAME" Set::Infinite::Arithmetic \- Scalar operations used by \fIquantize()\fR and \fIoffset()\fR .SS "\s-1AUTHOR\s0" .IX Subsection "AUTHOR" Flavio Soibelmann Glock \- fglock@pucrs.br .ie n .SS "%_MODE hash of subs" .el .SS "\f(CW%_MODE\fP hash of subs" .IX Subsection "%_MODE hash of subs" .Vb 1 \& $a\->offset ( value => [1,2], mode => \*(Aqoffset\*(Aq, unit => \*(Aqdays\*(Aq ); \& \& $a\->offset ( value => [1,2, \-5,\-4], mode => \*(Aqoffset\*(Aq, unit => \*(Aqdays\*(Aq ); .Ve .PP note: if mode = circle, then \*(L"\-5\*(R" counts from end (like a Perl negative array index). .PP .Vb 1 \& $a\->offset ( value => [1,2], mode => \*(Aqoffset\*(Aq, unit => \*(Aqdays\*(Aq, strict => $a ); .Ve .PP option 'strict' will return intersection($a,offset). Default: none. .ie n .SS "%subs_offset2($object, $offset1, $offset2)" .el .SS "\f(CW%subs_offset\fP2($object, \f(CW$offset1\fP, \f(CW$offset2\fP)" .IX Subsection "%subs_offset2($object, $offset1, $offset2)" .Vb 1 \& &{ $subs_offset2{$unit} } ($object, $offset1, $offset2); .Ve .PP A hash of functions that return: .PP .Vb 1 \& ($object+$offset1, $object+$offset2) .Ve .PP in \f(CW$unit\fR context. .PP Returned \f(CW$object\fR+$offset1, \f(CW$object\fR+$offset2 may be scalars or objects. .ie n .SS "%Offset_to_value($object, $offset)" .el .SS "\f(CW%Offset_to_valu\fPe($object, \f(CW$offset\fP)" .IX Subsection "%Offset_to_value($object, $offset)" .ie n .SS "%Init_quantizer($object)" .el .SS "\f(CW%Init_quantize\fPr($object)" .IX Subsection "%Init_quantizer($object)" .Vb 1 \& $Offset_to_value{$unit} ($object, $offset); \& \& $Init_quantizer{$unit} ($object); .Ve .PP Maps an 'offset value' to a 'value' .PP A hash of functions that return ( int($object) + \f(CW$offset\fR ) in \f(CW$unit\fR context. .PP Init_quantizer subroutines must be called before using subs_offset1 functions. .PP int(object)+offset is a scalar. .PP Offset_to_value is optimized for calling it multiple times on the same object, with different offsets. That's why there is a separate initialization subroutine. .PP \&\f(CW$self\fR\->{offset} is created on initialization. It is an index used by the memoization cache.