~ubuntu-branches/ubuntu/trusty/pdl/trusty-proposed

« back to all changes in this revision

Viewing changes to Lib/Slatec/slatec.pd

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-12-05 12:37:41 UTC
  • mfrom: (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091205123741-ilqkc9s4zlk71z13
Tags: 1:2.4.5+dfsg-2ubuntu1
* Merge from debian testing (LP: #492898), remaining changes:
  - debian/perldl.conf: Enabled NAN support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
the matrix argument provided is non-invertible. The matrix threads as usual.
201
201
 
202
202
This routine was previously known as C<det> which clashes now with
203
 
L<det:PDL::MatrixOps/det> which is provided by
204
 
L<PDL::MatrixOps|PDL::MatrixOps>. For the moment L<PDL::Slatec> will
205
 
also load L<PDL::MatrixOps> thereby making sure that older scripts work.
 
203
L<det|PDL::MatrixOps/det> which is provided by
 
204
L<PDL::MatrixOps|PDL::MatrixOps>. For the moment
 
205
L<PDL::Slatec|PDL::Slatec> will also load
 
206
L<PDL::MatrixOps|PDL::MatrixOps> thereby making sure that older
 
207
scripts work.
 
208
 
 
209
=head2 PDL::Slatec::fft
 
210
 
 
211
=for ref
 
212
 
 
213
Fast Fourier Transform
 
214
 
 
215
=for example
 
216
 
 
217
  $v_in = pdl(1,0,1,0);
 
218
  ($azero,$a,$b) = PDL::Slatec::fft($v_in);
 
219
 
 
220
C<PDL::Slatec::fft> is a convenience wrapper for L<ezfftf|ezfftf>, and
 
221
performs a Fast Fourier Transform on an input vector C<$v_in>. The
 
222
return values are the same as for L<ezfftf|ezfftf>.
 
223
 
 
224
=head2 PDL::Slatec::rfft
 
225
 
 
226
=for ref
 
227
 
 
228
reverse Fast Fourier Transform
 
229
 
 
230
=for example
 
231
 
 
232
  $v_out = PDL::Slatec::rfft($azero,$a,$b);
 
233
  print $v_in, $vout
 
234
  [1 0 1 0] [1 0 1 0]
 
235
 
 
236
C<PDL::Slatec::rfft> is a convenience wrapper for L<ezfftb|ezfftb>,
 
237
and performs a reverse Fast Fourier Transform. The input is the same
 
238
as the output of L<PDL::Slatec::fft|/PDL::Slatec::fft>, and the output
 
239
of C<rfft> is a data vector, similar to what is input into
 
240
L<PDL::Slatec::fft|/PDL::Slatec::fft>.
206
241
 
207
242
=cut
208
243
 
429
464
 
430
465
|);
431
466
 
432
 
pp_add_exported('',"eigsys matinv fft fftb polyfit polycoef polyvalue");
 
467
pp_add_exported('',"eigsys matinv polyfit polycoef polyvalue");
433
468
 
434
469
pp_addpm(<<'END');
435
470
 
499
534
        return $tmp;
500
535
}
501
536
 
502
 
*fft = \&PDL::fft;
503
 
sub PDL::fft (;@) {
 
537
sub fft (;@) {
504
538
        my($v) = @_;
505
539
        my $ws = prepfft($v->getdim(0));
506
540
        ezfftf($v,(my $az = PDL->null), (my $a = PDL->null),