⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hk.pl,v

📁 Lin-Kernighan heuristic for the TSP and minimum weight perfect matching
💻 PL,V
字号:
head	1.1;access;symbols	zero-five-zero:1.1	zero-four-seventeen:1.1;locks	neto:1.1; strict;comment	@# @;1.1date	98.10.17.22.24.48;	author neto;	state Exp;branches;next	;desc@Extract Held Karp bounds from log files@1.1log@Initial revision@text@#! /usr/bin/perl -wuse strict;# Extract approximate held karp bounds from output of lk --held-karp.# Output format is as instance lines for expt.plmy $iters = "N/10";my $seed =0;my $n=0;my $d=-1;my $last_bound = -1;my $bound = -1;my $last_file="none";my $verbose=10;foreach (@@ARGV) {	my $file = $_;	print "# $file\n" if $verbose >= 50;	if ( $file =~ m/^ben.(\d+).(\d+).(\d+)/ ) {		if ( !($1 == $d && $2 == $seed & $3 == $n) ) {			print "instance ben.$d.$seed.$n:$n:-l hka $last_bound : $iters\n";			$last_bound = -1;			$last_file = $file;		}		($d,$seed,$n) = ($1,$2,$3);		open IN, "grep 'Held-Karp lower bound' $file|";		while (<IN>) {			if ( m/^Held-Karp lower bound: (\d+\.\d+)/ ) {				print "#$_" if $verbose >= 75;				$bound = $1+0;				$last_bound >= $bound || ($last_bound = $bound);			}		}		close IN;	}}@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -