- SEE ALSO
- COPYRIGHT AND LICENSE
CXC::Number::Sequence - Numerical Sequence Generation
use CXC::Number::Sequence; CXC::Number::Sequence->build( $type, %options );
This is an entry point for building sequences of numbers.
Currently, a sequence is a subclass of
CXC::Number::Sequence, but this may change to a role based relationship.
At present sequences are not lazily built. This can easily be accommodated and iterators added.
$sequence = CXC::Number::Sequence->build( $class, %options );
Construct a sequence of type
$class is a subclass of CXC::Number::Sequence. If
$class is in the
CXC::Number::Sequence namespace, only the relative class name is required, e.g.
linear => CXC::Number::Sequence::Linear
$class is converted to CamelCase; input words should be separated by a
build will first attempt to load
$class in the
CXC::Number::Sequence namespace, and if not present will assume
$class is a full package name.
$array_ref = $sequence->elements;
Return the sequence elements as a reference to an array of Perl numbers.
$nelem = $sequence->nelem;
The number of elements in the sequence.
$spacing = $sequence->spacing;
Return the spacing between elements as a reference to an array of Perl numbers.
$min = $sequence->min;
Returns the minimum bound of the sequence as a Perl number.
$max = $sequence->max;
Returns the maximum bound of the sequence as a Perl number.
$elements = $sequence->bignum->elements;
Returns an object which returns copies of the internal Math::BigFloat objects for the following methods
elements -> Array[Math::BigFloat] spacing -> Array[Math::BigFloat] min -> Math::BigFloat max -> Math::BigFloat
$elements = $sequence->pdl->elements;
Returns an object which returns piddles for the following methods
elements -> piddle spacing -> piddle
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=CXC-Number or by email to firstname.lastname@example.org.
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Please see those modules/websites for more information related to this module.
Diab Jerius <email@example.com>
This software is Copyright (c) 2019 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007