CXC-Number

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         "requires" : {
            "Exporter::Shiny" : "0",
            "Exporter::Tiny" : "0",
            "Hash::Wrap" : "0.11",
            "List::Util" : "1.54",
            "Math::BigFloat" : "0",
            "Math::BigInt" : "0",
            "Moo" : "0",
            "MooX::StrictConstructor" : "0",
            "MooX::Tag::TO_HASH" : "0.04",
            "Ref::Util" : "0",
            "Safe::Isa" : "0",
            "Tree::Range::RB" : "0",
            "Type::Library" : "0",
            "Type::Params" : "2.002",
            "Type::Tiny" : "1.016",
            "Type::Utils" : "0",
            "Types::Common::Numeric" : "0",
            "Types::Standard" : "0",
            "custom::failures" : "0",
            "enum" : "0",

META.yml  view on Meta::CPAN

requires:
  Exporter::Shiny: '0'
  Exporter::Tiny: '0'
  Hash::Wrap: '0.11'
  List::Util: '1.54'
  Math::BigFloat: '0'
  Math::BigInt: '0'
  Moo: '0'
  MooX::StrictConstructor: '0'
  MooX::Tag::TO_HASH: '0.04'
  Ref::Util: '0'
  Safe::Isa: '0'
  Tree::Range::RB: '0'
  Type::Library: '0'
  Type::Params: '2.002'
  Type::Tiny: '1.016'
  Type::Utils: '0'
  Types::Common::Numeric: '0'
  Types::Standard: '0'
  custom::failures: '0'
  enum: '0'

dist.ini  view on Meta::CPAN

[Prereqs]
Exporter::Shiny         = 0
Exporter::Tiny          = 0
Hash::Wrap              = 0.11
List::Util              = 1.54
Math::BigFloat          = 0
Math::BigInt            = 0
Moo                     = 0
MooX::StrictConstructor = 0
MooX::Tag::TO_HASH      = 0.04
Ref::Util               = 0
Safe::Isa               = 0
Tree::Range::RB         = 0
Type::Library           = 0
Type::Params            = 2.002
Type::Tiny              = 1.016
Type::Utils             = 0
Types::Common::Numeric  = 0
Types::Standard         = 0
custom::failures        = 0
enum                    = 0

lib/CXC/Number/Grid.pm  view on Meta::CPAN

package CXC::Number::Grid;

# ABSTRACT: A class representing a one dimensional numeric grid

use v5.28;

use POSIX ();

use Types::Standard qw( ArrayRef Bool Dict Enum HashRef InstanceOf Optional Slurpy );
use Type::Params    qw( signature signature_for );
use Ref::Util       qw( is_plain_hashref is_blessed_ref );
use List::Util      qw( uniqnum );

use CXC::Number::Grid::Types -types;
use CXC::Number::Grid::Failure qw( parameter_interface parameter_constraint internal );

use CXC::Number::Grid::Tree;
use constant Tree => 'CXC::Number::Grid::Tree';

use Safe::Isa;

lib/CXC/Number/Grid.pm  view on Meta::CPAN

  bool     => sub { 1 };

BEGIN { with 'MooX::Tag::TO_HASH' }    # so can see has

my sub _croak {
    require Carp;
    goto \&Carp::croak;
}

sub _convert ( $self, $bignum ) {
    require Ref::Util;

    return Ref::Util::is_plain_arrayref( $bignum )
      ? [ map { $_->numify } $bignum->@* ]
      : $bignum->numify;
}







lib/CXC/Number/Grid/Role/BigNum.pm  view on Meta::CPAN

use v5.28;

use Moo::Role;

our $VERSION = '0.13';

use experimental 'signatures';
use namespace::clean;

sub _convert ( $self, $bignum ) {
    require Ref::Util;

    return Ref::Util::is_plain_arrayref( $bignum )
      ? [ map { $_->copy } $bignum->@* ]
      : $bignum->copy;
}

#
# This file is part of CXC-Number
#
# This software is Copyright (c) 2019 by Smithsonian Astrophysical Observatory.
#
# This is free software, licensed under:

lib/CXC/Number/Grid/Role/PDL.pm  view on Meta::CPAN

use PDL::Lite ();

use Moo::Role;

use experimental 'signatures';
use namespace::clean;

our $VERSION = '0.13';

sub _convert ( $self, $bignum ) {
    require Ref::Util;

    return Ref::Util::is_plain_arrayref( $bignum )
      ? PDL->pdl( [ map { $_->numify } $bignum->@* ] )
      : $bignum->numify;
}






sub include ( $self ) {

lib/CXC/Number/Sequence.pm  view on Meta::CPAN

has _raw_elements => (
    is       => 'lazy',
    init_arg => 'elements',
    isa      => Sequence,
    required => 1,
    coerce   => 1,
);


sub _convert ( $self, $bignum ) {
    require Ref::Util;

    return Ref::Util::is_plain_arrayref( $bignum )
      ? [ map { $_->numify } $bignum->@* ]
      : $bignum->numify;
}







lib/CXC/Number/Sequence/Role/BigNum.pm  view on Meta::CPAN

use v5.28;

use Moo::Role;

our $VERSION = '0.13';

use experimental 'signatures';
use namespace::clean;

sub _convert ( $self, $bignum ) {
    require Ref::Util;

    return Ref::Util::is_plain_arrayref( $bignum )
      ? [ map { $_->copy } $bignum->@* ]
      : $bignum->copy;
}

#
# This file is part of CXC-Number
#
# This software is Copyright (c) 2019 by Smithsonian Astrophysical Observatory.
#
# This is free software, licensed under:

lib/CXC/Number/Sequence/Role/PDL.pm  view on Meta::CPAN

use PDL::Lite ();

use Moo::Role;

use experimental 'signatures';
use namespace::clean;

our $VERSION = '0.13';

sub _convert ( $self, $bignum ) {
    require Ref::Util;

    return Ref::Util::is_plain_arrayref( $bignum )
      ? PDL->pdl( [ map { $_->numify } $bignum->@* ] )
      : $bignum->numify;
}

#
# This file is part of CXC-Number
#
# This software is Copyright (c) 2019 by Smithsonian Astrophysical Observatory.
#
# This is free software, licensed under:

t/00-report-prereqs.dd  view on Meta::CPAN

                      'requires' => {
                                      'Exporter::Shiny' => '0',
                                      'Exporter::Tiny' => '0',
                                      'Hash::Wrap' => '0.11',
                                      'List::Util' => '1.54',
                                      'Math::BigFloat' => '0',
                                      'Math::BigInt' => '0',
                                      'Moo' => '0',
                                      'MooX::StrictConstructor' => '0',
                                      'MooX::Tag::TO_HASH' => '0.04',
                                      'Ref::Util' => '0',
                                      'Safe::Isa' => '0',
                                      'Tree::Range::RB' => '0',
                                      'Type::Library' => '0',
                                      'Type::Params' => '2.002',
                                      'Type::Tiny' => '1.016',
                                      'Type::Utils' => '0',
                                      'Types::Common::Numeric' => '0',
                                      'Types::Standard' => '0',
                                      'custom::failures' => '0',
                                      'enum' => '0',



( run in 0.531 second using v1.01-cache-2.11-cpan-a5abf4f5562 )