diff --git a/lib/Math/Function/Interpolator.pm b/lib/Math/Function/Interpolator.pm index 9d9b22f..a5a1cf5 100644 --- a/lib/Math/Function/Interpolator.pm +++ b/lib/Math/Function/Interpolator.pm @@ -37,6 +37,13 @@ has points => ( required => 1, ); +=head1 SUBROUTINES/METHODS + +=head2 buildargs +BUILDARGS + +=cut + sub BUILDARGS { ## no critic (Subroutines::RequireArgUnpacking) my $self = shift; my %args = ref( $_[0] ) ? %{ $_[0] } : @_; diff --git a/lib/Math/Function/Interpolator/Cubic.pm b/lib/Math/Function/Interpolator/Cubic.pm index a20d863..83829bb 100644 --- a/lib/Math/Function/Interpolator/Cubic.pm +++ b/lib/Math/Function/Interpolator/Cubic.pm @@ -92,6 +92,13 @@ sub _extrapolate_spline { return $first->{y} - ( $first->{x} - $x ) * $derivative1; } +=head1 SUBROUTINES/METHODS + +=head2 cubic +do_calculation + +=cut + # Returns the interpolated_y given point_x and a minimum of 5 data points sub do_calculation { my ( $self, $x ) = @_; diff --git a/lib/Math/Function/Interpolator/Linear.pm b/lib/Math/Function/Interpolator/Linear.pm index ae39fc8..fab8822 100644 --- a/lib/Math/Function/Interpolator/Linear.pm +++ b/lib/Math/Function/Interpolator/Linear.pm @@ -11,6 +11,10 @@ use Carp qw(confess); use Number::Closest::XS qw(find_closest_numbers_around); use Scalar::Util qw(looks_like_number); +=head1 NAME +Math::Function::Interpolator::Linear - Interpolation made easy +=cut + has 'interpolate' => ( is => 'ro', isa => sub { @@ -20,6 +24,13 @@ has 'interpolate' => ( required => 1 ); +=head1 SUBROUTINES/METHODS + +=head2 linear +do_calculation + +=cut + # Solves for point_y linearly given point_x and an array of points. sub do_calculation { my ( $self, $x ) = @_; diff --git a/lib/Math/Function/Interpolator/Quadratic.pm b/lib/Math/Function/Interpolator/Quadratic.pm index e62a2d5..9a05981 100644 --- a/lib/Math/Function/Interpolator/Quadratic.pm +++ b/lib/Math/Function/Interpolator/Quadratic.pm @@ -26,6 +26,13 @@ has 'interpolate' => ( required => 1 ); +=head1 SUBROUTINES/METHODS + +=head2 quadratic +do_calculation + +=cut + # Returns the interpolated_y value given point_x with 3 data points sub do_calculation { my ( $self, $x ) = @_;