I wouldn't be interested in fixing the old module. How about a brand new
one? I'd we willing to contribute the following module:


NAME
    PDL::Multivariate - Multivariate normal distributions

SYNOPSIS
        my $d = new PDL::Multivariate(2);
        $d->set_mean(pdl([3,5]));
        $d->set_covariance(pdl([[2,1],[1,1]]));
        my $x = $d->rand();

DESCRIPTION
    This package provides a set of routines to generate samples from
    multivariate normal (Gaussian) distributions.
    <http://en.wikipedia.org/wiki/Multivariate_normal_distribution>

    A new multivariate normal distribution is created with

        $d = new PDL::Multivariate(n);

    Where "n" is the dimension of the distribution.

    To set the distribution parameters, use the routines

        $d->set_mean($mu);           # mean vector
        $d->set_covariance($cov);    # covariance matrix

    To generate a random sample vector from the distribution

        $x = $d->rand();

    To generate a single number from the standard normal distribution

        $y = PDL::Multivariate::rand_standard_normal();

    The source of all pseudorandom numbers is the standard Perl subroutine
    rand, so you may call srand with a fixed seed to generate reproducible
    results.


Steve


-----Original Message-----
From: Derek Lamb [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 02, 2007 1:14 AM
To: Steve Chapel
Cc: [email protected]
Subject: Re: [Perldl] Problems with PDL::Gaussian

Hi Steve,

Your immediate problem seems to be that you don't have PDL::Slatec 
installed, probably because you didn't have the Slatec library installed 
when you installed PDL.  Obtaining that, then rebuilding and installing 
PDL, will help get around that problem.

Before you get to far with this, though, you may want to read the bug 
report from earlier this year re: PDL::Gaussian at 
http://sourceforge.net/tracker/index.php?func=detail&aid=1661607&group_id=61
2&atid=100612

As far as I can tell, and since nobody has proven me wrong, 
PDL::Gaussian is at the moment a mostly dead module.  It hasn't been 
substantially touched in 7 years, and has significant problems (I think) 
with explicit vs implicit threading.  To my knowledge nobody has used it 
for a long time until Adam tried earlier this year.  I looked at it for 
a little while, then realized fixing it was a larger problem than I had 
the time or inclination for, unfortunately.

It seems like it would be a nice module to have working properly, so if 
you have the desire to crank on it, go right ahead!

Derek


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to