~ubuntu-branches/ubuntu/raring/pdl/raring-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Simple test of the interpol routine

use PDL::Lite;


print "1..1\n";  

my $testNo = 1;



my $yvalues =  (new PDL( 0..5))   - 20;

my $xvalues = -(new PDL (0..5))*.5;

my $x = new PDL(-2);

ok( $testNo++,$x->interpol($xvalues,$yvalues) == -16 );



#  Testing utility functions:
sub ok {
        my $no = shift ;
        my $result = shift ;
        print "not " unless $result ;
        print "ok $no\n" ;
}