NAME
CXC::Number::Sequence - Numerical Sequence Generation
VERSION
version 0.11
SYNOPSIS
use CXC::Number::Sequence;
CXC::Number::Sequence->build( $type, %options );
DESCRIPTION
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.
Constraints
At present sequences are not lazily built. This can easily be accommodated and iterators added.
CONSTRUCTORS
build
$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.
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.
METHODS
elements
$array_ref = $sequence->elements;
Return the sequence elements as a reference to an array of Perl numbers.
nelem
$nelem = $sequence->nelem;
The number of elements in the sequence.
spacing
$spacing = $sequence->spacing;
Return the spacing between elements as a reference to an array of Perl numbers.
min
$min = $sequence->min;
Returns the minimum bound of the sequence as a Perl number.
max
$max = $sequence->max;
Returns the maximum bound of the sequence as a Perl number.
bignum
$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
pdl
$elements = $sequence->pdl->elements;
Returns an object which returns piddles for the following methods
elements -> piddle
spacing -> piddle
INTERNALS
SUPPORT
Bugs
Please report any bugs or feature requests to bug-cxc-number@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=CXC-Number
Source
Source is available at
https://gitlab.com/djerius/cxc-number
and may be cloned from
https://gitlab.com/djerius/cxc-number.git
SEE ALSO
Please see those modules/websites for more information related to this module.
AUTHOR
Diab Jerius <djerius@cpan.org>
COPYRIGHT AND LICENSE
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