CXC::Number::Sequence - Numerical Sequence Generation
version 0.06
use CXC::Number::Sequence; CXC::Number::Sequence->build( $type, %options );
This is an entry point for building sequences of numbers.
WARNING
Currently, a sequence is a subclass of CXC::Number::Sequence, but this may change to a role based relationship.
CXC::Number::Sequence
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, where $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.
$class
linear => CXC::Number::Sequence::Linear
(note that $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.
build
$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 bug-cxc-number@rt.cpan.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.
CXC::Number
CXC::Number::Grid
CXC::Number::Sequence::Linear
CXC::Number::Sequence::Ratio
CXC::Number::Sequence::Fixed
Diab Jerius <djerius@cpan.org>
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
To install CXC::Number, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CXC::Number
CPAN shell
perl -MCPAN -e shell install CXC::Number
For more information on module installation, please visit the detailed CPAN module installation guide.