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

📄 milestone.pl.in,v

📁 Lin-Kernighan heuristic for the TSP and minimum weight perfect matching
💻 IN,V
字号:
head	1.3;access;symbols	zero-five-zero:1.3	zero-four-seventeen:1.3	zero-four-ten:1.3	zero-four-nine:1.3	zero-four-eight:1.3	zero-four-five:1.3	zero-four-three:1.3	zero-four-zero:1.3;locks	neto:1.3; strict;comment	@# @;1.3date	97.11.07.22.21.01;	author neto;	state Exp;branches;next	1.2;1.2date	97.10.31.20.51.37;	author neto;	state Exp;branches;next	1.1;1.1date	97.06.19.19.38.49;	author neto;	state Exp;branches;next	;desc@Distill milestone data from LK output.@1.3log@Now we expect gzipped log files.@text@#! @@PERL@@# @@configure_input@@# milestone.pl# Distill milestone data from LK output.# It doesn't handle lower bound names with embedded spaces.  Alas.#$number_expr = "(-?\\d+\\.?\\d*|\\.\\d+)"; # See Programming Perl$milestone_expr = "\\s+$number_expr% above \\S+ after $number_expr";open(IN, "zcat @@ARGV |");  # Uncompress input files.open(MOUT ,">milestone.gpl") || die "Can't open milestone.gpl for writing";while(<IN>) {	if( m/^Initial milestone:$milestone_expr/o) {		print MOUT "$2 $1\n";	} elsif( m/^Milestone:$milestone_expr/o) {		print MOUT "$2 $1\n";	} elsif( m/^LK phase ended .* after $number_expr sec for LK/o) {		$end_time = $1;	} elsif( m/^Final milestone: $number_expr\% above/o) {		print MOUT "$end_time $1\n";	}}close(MOUT);@1.2log@Now report the final milestone, and allow negative numbers(e.g. in case we find a tour significantly better than best known.)@text@d9 2d13 1a13 1while(<>) {@1.1log@Initial revision@text@d7 1a7 1$number_expr = "(\\d+\\.?\\d*|\\.\\d+)"; # See Programming Perld10 1d16 4@

⌨️ 快捷键说明

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