Dear all

 I'm dummy in perl.

I would like to load a two dimensional table with a scalar table (this table 
contain split string line by line ) from a file.

It's working with this way but it's take lot of memory and it's stop with 
memory overflow.

I would like to use (DBM or PDL module instead but I'm not convenient with 
that.)

$vector_table[$stringlength][$vectors+1]=0;
$int=0;$int1=0;
my @indexed_vector;

                while ($int != $customvector) 
                 {
                        @indexed_vector=split(//,@AVCOUT[$int]);
                        $int1=0;
                        while ($int1 != $stringlength)          {
                                 $vector_table[$int1][$int] = 
(@indexed_vector[$int1]);
                                $int1++;}
                $int++; }
Best regards



-----Original Message-----
From: mraptor [mailto:[email protected]] 
Sent: mardi 12 novembre 2013 21:11
To: [email protected]
Subject: [Perldl] Fwd: Random generation...

thanks... my mistake with the byte thing..
What I want to do is to generate normally distributed random numbers, where the 
range is humongous (fe: 2^1000) I just tried :
>$n = 1000
> p grandom(3) * ((2**$n)/2) + sqrt((2**$n))/2
[-1.9906798e+300 -3.9087665e+300 -5.6272303e+300]


those seem like a random numbers !! but why negative ?
Do you think I should use Math::BigInt

On Mon, Nov 11, 2013 at 11:55 AM, Craig DeForest <[email protected]> 
wrote:
> The issue is that grandom doesn't work properly on integer types, 
> since it makes a distribution with mean 0 and stddev 1.  It's a bit 
> awkward, but you can use
>
>  $vals = (grandom($n) * $stdev + $mean)->rint->byte
>
> instead.
>
>
> On Nov 11, 2013, at 8:59 AM, mraptor <[email protected]> wrote:
>
>> Is there are way to generate random values based on Normal distribution.
>> The same like rnorm() in R-language.
>>
>>> round( rnorm(3,mean=2^n/2,sd=sqrt(2^n)/2) )
>> [1] 524758 524540 524647
>>
>> I see there is grandom() funtion, but it requires some sort of lib (ndtri) ?
>>
>> pdl> p grandom(byte,1)
>>
>> ndtri domain error
>> [0]
>>
>>
>> thanks
>>
>> _______________________________________________
>> Perldl mailing list
>> [email protected]
>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>>
>

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

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

Reply via email to