GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Set::Infinite::Arithmetic(3) User Contributed Perl Documentation Set::Infinite::Arithmetic(3)

Set::Infinite::Arithmetic - Scalar operations used by quantize() and offset()

Flavio Soibelmann Glock - fglock@pucrs.br

    $a->offset ( value => [1,2], mode => 'offset', unit => 'days' );

    $a->offset ( value => [1,2, -5,-4], mode => 'offset', unit => 'days' );

note: if mode = circle, then "-5" counts from end (like a Perl negative array index).

    $a->offset ( value => [1,2], mode => 'offset', unit => 'days', strict => $a );

option 'strict' will return intersection($a,offset). Default: none.

    &{ $subs_offset2{$unit} } ($object, $offset1, $offset2);

A hash of functions that return:

    ($object+$offset1, $object+$offset2)

in $unit context.

Returned $object+$offset1, $object+$offset2 may be scalars or objects.

    $Offset_to_value{$unit} ($object, $offset);

    $Init_quantizer{$unit} ($object);

Maps an 'offset value' to a 'value'

A hash of functions that return ( int($object) + $offset ) in $unit context.

Init_quantizer subroutines must be called before using subs_offset1 functions.

int(object)+offset is a scalar.

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.

$self->{offset} is created on initialization. It is an index used by the memoization cache.

2008-06-21 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.