Last active
August 29, 2015 14:01
-
-
Save MHenderson/a2cc887ee45b17b4e53d to your computer and use it in GitHub Desktop.
Greedy colouring of Queen Graphs.
This file contains hidden or 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
| #!/bin/bash | |
| for (( i=1; i<=$1; i++ )) | |
| do | |
| echo $RANDOM | |
| done |
This file contains hidden or 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
| # To use sed -n -f get_colours.sed queen13_13.col.res > output.txt | |
| s/CLRS \([0-9]\+\) [A-Z a-z = 0-9 .]*/\1/p |
This file contains hidden or 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
| src_dir:=~/workspace/graphs-collection/src/Colouring/Trick | |
| generate_seeds:=./generate_seeds | |
| simulation:=./simulation2 | |
| get_colours:=get_colours.sed | |
| output:=output.txt | |
| approx:=chromatic_approx.txt | |
| seeds:=seeds.txt | |
| problem_file:=$(src_dir)/queen16_16.col | |
| result_file=$(addsuffix .res, $(problem_file)) | |
| iterations:=1000 | |
| type:=simple | |
| ordering:=lbfsr | |
| chromatic_approx.txt: $(output) | |
| sort -n $< | head -n 1 > $@ | |
| output.txt: $(get_colours) $(result_file) | |
| sed -n -f $< $(result_file) > $@ | |
| $(result_file): $(problem_file) $(seeds) | |
| $(simulation) $(seeds) $(type) $(ordering) $< | |
| $(seeds): | |
| $(generate_seeds) $(iterations) > $(seeds) | |
| clean: | |
| rm -f $(approx) | |
| rm -f $(output) | |
| rm -f $(result_file) | |
| rm -f $(seeds) |
This file contains hidden or 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
| #!/bin/bash | |
| # First parameter is number of iterations | |
| # Second parameter is type | |
| # Third parameter is ordering | |
| # Fourth parameter is filename | |
| for (( i=1; i<=$1; ++i )) | |
| do | |
| ccli greedy --type=$2 --ordering=$3 --seed=$RANDOM $4 | |
| done |
This file contains hidden or 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
| #!/bin/bash | |
| # First parameter is number of iterations ## BROKEN | |
| # Second parameter is type | |
| # Third parameter is ordering | |
| # Fourth parameter is filename | |
| parallel -j2 --eta ccli greedy --type=$2 --ordering=$3 --seed={1} $4 :::: $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment