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

📄 lkdoitcmp.in,v

📁 Lin-Kernighan heuristic for the TSP and minimum weight perfect matching
💻 IN,V
字号:
head	1.4;access;symbols	zero-five-zero:1.4	zero-four-seventeen:1.4	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.4; strict;comment	@# @;1.4date	98.10.15.18.10.42;	author neto;	state Exp;branches;next	1.3;1.3date	97.10.28.20.39.10;	author neto;	state Exp;branches;next	1.2;1.2date	97.06.25.21.05.08;	author neto;	state Exp;branches;next	1.1;1.1date	97.06.19.18.57.36;	author neto;	state Exp;branches;next	;desc@Make multiple versions of the lk binary, each with its ownlevel of declustering support.@1.4log@Try to make this work with the seemingly broken automake 1.3@text@#! @@PERL@@# @@configure_input@@# doitcmp# Make multiple versions of lk binaries, each with different levels of # declustering support.# This Perl script got a little out of hand.  # I didn't want to change the Makefile too much...  :)# This must be run from within the source directory.## This script takes no arguments$header= "declevel.h";$tmpheader= "/tmp/perlsub$$";$ident_expr="[A-Za-z_][A-Za-z_0-9]*";&compile("lk.no_d","JBMR_DECLUSTER_IN_ELIGIBILITY_TEST",0,"JBMR_DECLUSTER_IN_GREEDY",0);&compile("lk.deg","JBMR_DECLUSTER_IN_ELIGIBILITY_TEST",1,"JBMR_DECLUSTER_IN_GREEDY",1);# Put declustering second so that it is the default left in declevel.h# when we ship out the code.exit 0;sub compile {	local($name) = shift(@@_);	&substitute(@@_);	system("touch $header"); print "===touch $header\n";	system("touch lk.c"); print "===touch lk.c\n";	system("rm lk.o"); print "===rm lk.o\n";	system("make lk"); 		 print "===make lk\n";	system("mv lk $name");   print "===mv lk $name\n";#	system("strip $name");  # This is optional.	print STDERR "made $name\n";}sub substitute {	local(%substitutions)=@@_;	local(%dict);	local($processing)=1;	local($s);	foreach $symbol (keys(%substitutions)) {		$dict{$symbol} = 1;	}	open(HEADERIN,"<$header") || die "Can't open $header for reading";	open(HEADEROUT, ">$tmpheader") || die "Can't open $tmpheader for writing";	while(<HEADERIN>) {		#print "line:$_";		if ($processing && m/^.define\s+($ident_expr)/ && $dict{$1} ) {			#print "MATCH";			$s=$substitutions{$1};			print HEADEROUT "#define $1 $s\n";		} elsif (m/Don\'t touch the following/) {			$processing=0;			#print "STOP PROCESSING\n";			print HEADEROUT;		} else {			print HEADEROUT;		}	}	close(HEADERIN);	close(HEADEROUT);	open(HEADERIN,"<$tmpheader") || die "Can't open $tmpheader for reading";	open(HEADEROUT, ">$header") || die "Can't open $header for writing";	while(<HEADERIN>) {		print HEADEROUT;	}	close(HEADERIN);	close(HEADEROUT);	unlink($tmpheader);}@1.3log@Make stripping easily taken out of the script.Put deg second so it is default for shipping out the code.@text@d28 6a33 2	system("make lk && mv lk $name");	system("strip $name");  # This is optional.@1.2log@Added a comment@text@d20 2d28 3a30 1	system("make lk && mv lk $name && strip $name");@1.1log@Initial revision@text@d8 1@

⌨️ 快捷键说明

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