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

📄 cfresults.pl.in,v

📁 Lin-Kernighan heuristic for the TSP and minimum weight perfect matching
💻 IN,V
字号:
head	1.2;access;symbols	zero-five-zero:1.2	zero-four-seventeen:1.2	zero-four-ten:1.2	zero-four-nine:1.2	zero-four-eight:1.2	zero-four-five:1.2	zero-four-three:1.2	zero-four-zero:1.1;locks	neto:1.2;comment	@# @;1.2date	98.07.31.17.03.49;	author neto;	state Exp;branches;next	1.1;1.1date	97.11.07.22.25.02;	author neto;	state Exp;branches;next	;desc@ Extract final length and time for preprocessing+LK to create Bentley-stylematched comparison graphs.@1.2log@Compare results from multiple LK runs on a single instance.@text@#! @@PERL@@# @@configure_input@@# Extract final length and time for preprocessing+LK.# All the input files are presented at once, # e.g. out.grid1024.0.deg, out.grid1024.0.no_d, out.grid1024.1.deg...# We tell from the version number line whether cluster compensation was used.# $Log$$is_deg = 0;$float_expr= "(-?\\d+\\.?\[0-9\]*|\\.\[0-9\]+)"; # See Programming Perl$file_num = 0;while(<>) {	if ( m/^LK \d+\.\d+\.\d+([^\s]*)/ ) {		# Determine whether cluster compensation was used.		print STDERR;		$is_deg = ($1 eq 'deg');		$have_milestones = 0;	} elsif ( m/^LK phase ended with incumbent_len == \(0+\*2\^32\+$float_expr\) after $float_expr sec for LK and $float_expr sec for ds\+LK/o ) {		($len,$lk_sec,$ds_sec)=($1,$2,$3);		print STDERR;		print STDERR "$len $lk_sec $ds_sec\n";		if ($is_deg) {			($deg_len,$deg_lk_sec,$deg_ds_sec) = ($len,$lk_sec,$ds_sec);		};	} elsif ( m/^Final milestone: $float_expr\%/o ) {		print STDERR;		$have_milestones = 1;		my $pct = $1;  # percentage from the float_expr.		&output($pct);	} elsif ( m/^Length: $float_expr/o && !$have_milestones ) {		print STDERR;		my $len = $1;	# length is picked up inside float_expr.		&output($len);	}}exit 0;sub output {	$value = shift;	if ($is_deg) {		$deg_value = $value;   # Buffer it up for next time.	} else {		$filename = "cf.$file_num";		open(OUT,">$filename.deg") || die "Can't open $file_num.deg for writing";		open(OUTNIB,">$filename.no_d") || die "Can't open $file_num.no_d for writing";		print OUT "$deg_ds_sec $deg_value\n";		print OUTNIB "$deg_ds_sec $deg_value\n$ds_sec $value\n";		close(OUT);		close(OUTNIB);		$file_num++;	}}@1.1log@Initial revision@text@d7 1a7 1# So we need to keep a parity count.d9 1a9 1$is_deg = 1;  # Parity count.d11 1d17 6a22 1	if ( m/^LK phase ended with incumbent_len == \(0+\*2\^32\+$float_expr\) after $float_expr sec for LK and $float_expr sec for ds\+LK/o ) {d30 8a37 16		$pct = $1;		if ($is_deg) { 			$deg_pct = $pct; 			$is_deg = 0;		} else {			$filename = "cf.$file_num";			open(OUT,">$filename.deg") || die "Can't open $file_num.deg for writing";			open(OUTNIB,">$filename.no_d") || die "Can't open $file_num.no_d for writing";			print OUT "$deg_ds_sec $deg_pct\n";			print OUTNIB "$deg_ds_sec $deg_pct\n$ds_sec $pct\n";			close(OUT);			close(OUTNIB);			$file_num++;			$is_deg = 1;		}d40 20@

⌨️ 快捷键说明

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