Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Even more whitespace cleanups, while I'm in here...
- Loading branch information
Showing
17 changed files
with
116 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ unsigned size; | |
{ | ||
stack s; | ||
void exit(); | ||
|
||
s = (stack) malloc(sizeof(struct stack_st)); | ||
|
||
if (s == NULL) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,35 @@ | ||
#This program converts a file in .asn format to one in .min | ||
#This program converts a file in .asn format to one in .min | ||
#format by the following method: | ||
# --source nodes have supply 1 | ||
# --sink nodes have demand -1 | ||
# --arcs lower bounds are 0, arc capacities 1 | ||
# --arc costs are copied over | ||
# --arc costs are copied over | ||
|
||
BEGIN {firstarc = 1; | ||
print "c Transformation of asn to min format" } | ||
BEGIN {firstarc = 1; | ||
print "c Transformation of asn to min format" } | ||
|
||
#make first line or flag error | ||
#make first line or flag error | ||
# (NR == 1) && ($1 == "asn") { nodes = $2; arcs = $3; | ||
(NR == 1) && ($1 == "p") && ($2 == "asn") { nodes = $3; arcs = $4; | ||
print "p", "min" , nodes, arcs | ||
print "p", "min" , nodes, arcs | ||
} | ||
# (NR == 1) && ($1 != "asn") { print "ERROR WRONG INPUT FORMAT"} | ||
(NR == 1) && (($1 != "p") || ($2 != "asn")) { print "ERROR WRONG INPUT FORMAT"} | ||
|
||
#copy over comments | ||
#copy over comments | ||
$1 == "c" {print $0} | ||
|
||
#make sources and remember which they are | ||
$1 == "n" { print "n", "\t", $2, "\t", 1 ; | ||
remember[$2] = 1; | ||
$1 == "n" { print "n", "\t", $2, "\t", 1 ; | ||
remember[$2] = 1; | ||
} | ||
|
||
#make destination nodes | ||
(($1 == "a") && (firstarc==1)) { firstarc = 0; | ||
(($1 == "a") && (firstarc==1)) { firstarc = 0; | ||
for (i = 1; i<= nodes; i++) { | ||
if (remember[i] != 1) print "n", "\t", i, "\t", -1 ; | ||
if (remember[i] != 1) print "n", "\t", i, "\t", -1 ; | ||
} | ||
} | ||
|
||
#make arcs | ||
$1 == "a" {print "a", "\t", $2, "\t", $3, "\t", 0, "\t", 1, "\t", $4} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
|
||
The ftp directory pub/netflow/benchmarks contains two subdirectories | ||
for benchmark tests of your local computing environment. | ||
The ftp directory pub/netflow/benchmarks contains two subdirectories | ||
for benchmark tests of your local computing environment. | ||
|
||
fortran/ Contains programs and inputs for a test of a Fortran program. | ||
In that directory, see either readme.unix or readme.notunix | ||
depending upon whether your system can support Unix tools | ||
fortran/ Contains programs and inputs for a test of a Fortran program. | ||
In that directory, see either readme.unix or readme.notunix | ||
depending upon whether your system can support Unix tools | ||
such as pipes, awk, and shell programs. | ||
|
||
c/ Contains programs and inputs for a test of a C program. | ||
c/ Contains programs and inputs for a test of a C program. | ||
In that directory, see either readme.unix or readme.notunix | ||
depending upon whether your system can support Unix tools. | ||
depending upon whether your system can support Unix tools. | ||
|
||
If you can, run both the Fortran and C tests on your local system. The | ||
If you can, run both the Fortran and C tests on your local system. The | ||
goal is to gather timing information for a wide variety of architectures. | ||
|
||
Given the variety of architectures that participants are using, it is | ||
difficult to anticipate what will be possible and interesting. Send a | ||
note to netflow@dimacs.rutgers.edu if one of the following occurs: | ||
|
||
1) Some input files are too large to be transferred to your system. | ||
2) Some input files are too small to give interesting runtimes. | ||
3) Some other problem prevents you from performing the tests. | ||
2) Some input files are too small to give interesting runtimes. | ||
3) Some other problem prevents you from performing the tests. | ||
|
||
Enjoy! | ||
Cathy McGeoch | ||
Challenge Coordiinator | ||
mcgeoch@dimacs.rutgers.edu | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
This directory contains programs that generate networks and graphs. | ||
Most are in the DIMACS format. | ||
Most are in the DIMACS format. | ||
|
||
This Directory Contains: | ||
|
||
universal.c : A very portable random number generator, as C-language | ||
function calls. Read the in-line code. | ||
function calls. Read the in-line code. | ||
|
||
matching/ : A directory of generators for matching problems. | ||
|
||
matching/ : A directory of generators for matching problems. | ||
|
||
net-simple/ : A directory containing some very simple-minded generators, | ||
for checking compatiblity with DIMACS format. These | ||
generators are not much good for testing code. | ||
|
||
network/ : A directory containing generators for network problems. | ||
|
||
|
||
|
||
|
||
generators are not much good for testing code. | ||
|
||
network/ : A directory containing generators for network problems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
#This awk program converts files in the DIMACS .geom format into | ||
#bipartite instances in the .asn format. The first N/2 vertices | ||
#are red, and the last N/2 are blue (assumes n is even). | ||
#are red, and the last N/2 are blue (assumes n is even). | ||
#The program generates all red-to-blue edges, with edge costs corresponding | ||
#to Euclidean distance (using only the first two dimensions), truncated | ||
#to an integer. | ||
#to an integer. | ||
|
||
# C. McGeoch, July 1991 | ||
|
||
$1 == "p" { nodes = $3; | ||
count = 0; | ||
count = 0; | ||
reds = nodes/2; | ||
print "p" , "asn", nodes, reds*reds; | ||
print "c Converted from geometric instance " | ||
print "c using geomasn.a " | ||
print "c using geomasn.a " | ||
|
||
for (i = 1; i<= reds; i++) { print "n", i } | ||
for (i = 1; i<= reds; i++) { print "n", i } | ||
} | ||
|
||
$1 == "v" {count++; | ||
if (count <= reds) { # save the red location | ||
if (count <= reds) { # save the red location | ||
rx[count] = $2; | ||
ry[count] = $3; | ||
ry[count] = $3; | ||
} | ||
else { #generate red-blue arcs | ||
bx = $2; by = $3; | ||
for (i=1; i<=reds; i++) | ||
else { #generate red-blue arcs | ||
bx = $2; by = $3; | ||
for (i=1; i<=reds; i++) | ||
{ d1 = rx[i] - bx; | ||
d2 = ry[i] - by; | ||
dist = sqrt( d1*d1 + d2*d2 ); | ||
d2 = ry[i] - by; | ||
dist = sqrt( d1*d1 + d2*d2 ); | ||
printf "a %d %d %d\n", i, count, dist ; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
This directory contains very simple generators for network problems. | ||
Also contains translators from .asn and .max files to .min files. | ||
This directory contains very simple generators for network problems. | ||
Also contains translators from .asn and .max files to .min files. | ||
THESE GENERATORS PRODUCED INSTANCES WHICH ARE SYNTACTICALLY CORRECT | ||
(FOR DIMACS CHALLENGE FORMAT) BUT WHICH ARE PRETTY MUCH UNINTERESTING | ||
OTHERWISE. | ||
(FOR DIMACS CHALLENGE FORMAT) BUT WHICH ARE PRETTY MUCH UNINTERESTING | ||
OTHERWISE. | ||
|
||
genasn.c Generate an instance for assignment. See comments in | ||
program for command format. C source. | ||
genasn.c Generate an instance for assignment. See comments in | ||
program for command format. C source. | ||
|
||
genmin.c Generate an instance for min-cost flow. See comments in | ||
code for instructions. C source. | ||
genmin.c Generate an instance for min-cost flow. See comments in | ||
code for instructions. C source. | ||
|
||
genmax.c Generate an instance for max flow. See comments in | ||
code for instructions. C source. | ||
genmax.c Generate an instance for max flow. See comments in | ||
code for instructions. C source. | ||
|
||
makefile The make file. | ||
makefile The make file. | ||
|
||
test.* Sample input files. The suffix .min .max .asn denotes | ||
inputs for min-cost flow, max flow, and assignment. | ||
inputs for min-cost flow, max flow, and assignment. | ||
|
||
asnmin.a An awk program to convert assignment instances, in | ||
.asn format, to min-cost flow instances in .min format. | ||
.asn format, to min-cost flow instances in .min format. | ||
|
||
maxmin.a An awk program toconver max-flow instances, in .max format, | ||
to min-cost flow instances in .min format. | ||
to min-cost flow instances in .min format. |
Oops, something went wrong.