Commit a3dd3dd9 authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

lorenzian.pl: filename is omegas weights

parent 2f213ca2
...@@ -5,8 +5,8 @@ use warnings; ...@@ -5,8 +5,8 @@ use warnings;
use utf8; use utf8;
#The file to be read has format #The file to be read has format
#weight0 omega0 #omega0 weight0
#weight1 omega1 #omega1 weight1
#... #...
# #
my ($file, $wbegin, $wtotal, $wstep, $delta, $norm) = @ARGV; my ($file, $wbegin, $wtotal, $wstep, $delta, $norm) = @ARGV;
...@@ -69,8 +69,8 @@ sub computeValueFor ...@@ -69,8 +69,8 @@ sub computeValueFor
my $total = scalar(@$data); my $total = scalar(@$data);
for (my $i = 0; $i < $total; ++$i) { for (my $i = 0; $i < $total; ++$i) {
my $ptr = $data->[$i]; my $ptr = $data->[$i];
my $deltaOmega = $omega - $ptr->[1]; my $deltaOmega = $omega - $ptr->[0];
$sum += $ptr->[0]/($deltaOmega*$deltaOmega + $delta*$delta); $sum += $ptr->[1]/($deltaOmega*$deltaOmega + $delta*$delta);
} }
return $sum; return $sum;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment