Math::Interpolator::Knot - x/y point for use in interpolation
use Math::Interpolator::Knot; $pt = Math::Interpolator::Knot->new($x, $y); $x = $pt->x; $y = $pt->y; $role = $pt->role;
An object of this type represents a single known point on a one-dimensional curve. It is intended for use with Math::Interpolator, which will interpolate a curve between known points. These points are known as "knots".
Math::Interpolator
Creates and returns a new knot object with the specified x and y coordinates.
Returns the x coordinate of the knot.
Returns the y coordinate of the knot.
Returns the string "KNOT". This is used to distinguish knots from other types of entity that could appear in an interpolator's point list.
The interpolator uses only this public interface, so it is acceptable to substitute any other class that implements this interface. This may be done by subclassing this class, or by reimplementing all three methods independently. This is useful, for example, if the exact coordinates are expensive to calculate and it is desired to perform lazy evaluation with memoisation.
Math::Interpolator, Math::Interpolator::Source
Andrew Main (Zefram) <zefram@fysh.org>
Copyright (C) 2006, 2007, 2009, 2010, 2012 Andrew Main (Zefram) <zefram@fysh.org>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Math::Interpolator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Interpolator
CPAN shell
perl -MCPAN -e shell install Math::Interpolator
For more information on module installation, please visit the detailed CPAN module installation guide.