AI-SimulatedAnnealing
view release on metacpan or search on metacpan
lib/AI/SimulatedAnnealing.htm view on Meta::CPAN
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>AI::SimulatedAnnealing – optimize a list of numbers
according to a specified cost function.</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link href="mailto:" rev="made"/>
</head>
<body style="background-color: white">
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#prerequisites">PREREQUISITES</a></li>
<li><a href="#methods">METHODS</a></li>
<li><a href="#author">AUTHOR</a></li>
t/annealing_tests.t view on Meta::CPAN
# Create a reader for the BSV file:
my $bsv_file_reader;
eval {
$bsv_file_reader = Text::BSV::BsvFileReader->new($bsv_file_path);
};
if ($EVAL_ERROR) {
my $exception = $EVAL_ERROR;
given ($exception->get_type()) {
when ($Text::BSV::Exception::FILE_NOT_FOUND) {
say STDERR "$DQ$bsv_file_path$DQ is not a valid file path.";
exit(1);
}
when ($Text::BSV::Exception::IO_ERROR) {
say STDERR "Couldn't open $DQ$bsv_file_path$DQ for reading.";
exit(1);
}
when ($Text::BSV::Exception::INVALID_DATA_FORMAT) {
say STDERR "Invalid BSV data: " . $exception->get_message();
t/annealing_tests.t view on Meta::CPAN
while ($bsv_file_reader->has_next()) {
my $record;
my $dex;
eval {
$record = $bsv_file_reader->get_record();
};
if ($EVAL_ERROR) {
given ($EVAL_ERROR->get_type()) {
when ($Text::BSV::Exception::INVALID_DATA_FORMAT) {
die "ERROR: Invalid BSV data: "
. $EVAL_ERROR->get_message() . $LF;
}
default {
die "ERROR: " . $EVAL_ERROR->get_message() . $LF;
} # end when
} # end given
} # end if
( run in 1.387 second using v1.01-cache-2.11-cpan-df04353d9ac )