Subject: | rangevector values truncated to signed 8-bit quantities |
If a rangevector is defined that exceeds 127, like this
[ 1, 253 ]
any values over 127 will get truncated to signed 8-bit values, like so:
$ga->inject( [ [64], [126], [129], [250] ] );
# values become 64 126 -127 -6
The check of values against scope works correctly, although valid values
are truncated:
$ga->init( [ [ 1, 5000 ], ] );
$ga->inject( [ [4500] ] ); # becomes -108
# correctly triggers scope error
$ga->inject( [ [5500] ] );
# Value out of scope in the injected chromosome of type "rangevector": 5500
AI-Genetic-Pro-0.341
Perl v5.10.1 & v5.12.2 on Ubuntu 10.04.1 LTS
Linux computer 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC
2010 x86_64 GNU/Linux
Subject: | test_rangevector1_AI-Genetic-Pro |
Message body not shown because it is not plain text.
Subject: | test_rangevector2_AI-Genetic-Pro |
Message body not shown because it is not plain text.