Skip to content
Snippets Groups Projects
Commit f6c5aeec authored by Radek Hušek's avatar Radek Hušek
Browse files

test_exp_cdc: fix python impl & print graphs into log

parent bce3fc3b
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ DOC=" ...@@ -13,7 +13,7 @@ DOC="
to be tested. If it is empty it defaults to to be tested. If it is empty it defaults to
$SIZES. $SIZES.
It requires geng from Nauty packaget to be in the PATH. It requires geng from Nauty package to be in the PATH.
WARNING: This experiment takes a long time to complete. WARNING: This experiment takes a long time to complete.
" "
...@@ -28,13 +28,14 @@ fi ...@@ -28,13 +28,14 @@ fi
: ${LOG:=${0%.sh}-$SIZES.log} : ${LOG:=${0%.sh}-$SIZES.log}
: ${GENG:=geng} : ${GENG:=geng}
: ${PYTHON:=python}
SELF="$(readlink -f "$0")" SELF="$(readlink -f "$0")"
for s in $SIZES; do for s in $SIZES; do
"$GENG" -Ctfd3D3 $s "$GENG" -Ctfd3D3 $s
done | done |
nice python /dev/fd/5 "$(dirname "$SELF")" "$LOG" 5<<'EOF' nice $PYTHON /dev/fd/5 "$(dirname "$SELF")" "$LOG" 5<<'EOF'
if True: if True:
import sys, os import sys, os
sys.path.append(sys.argv[1] + "/..") sys.path.append(sys.argv[1] + "/..")
...@@ -53,6 +54,7 @@ if True: ...@@ -53,6 +54,7 @@ if True:
assert G.is_isomorphic(gadget.eval(UnderlayingGraph)) assert G.is_isomorphic(gadget.eval(UnderlayingGraph))
j = { j = {
"graph": G.sparse6_string(),
"cdc_count": real, "cdc_count": real,
"n": G.num_verts(), "n": G.num_verts(),
"expected_cdc_lowerbound": exp, "expected_cdc_lowerbound": exp,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment