#! /bin/csh -f

# Fat sausage, simple:

set usage = "$0 NV AVGD SEED STAG FLAGS"

# AVGD is the average outdegree (or indegree)

set NV = "$1"; shift
set avgd = "$1"; shift;
set seed = "$1"; shift;
set tag = "$1"; shift;
set flgs = ( $* )

if ( ! $?bindir ) then
  echo 'must define environment variable $bindir'; exit 1
endif

@ L = 5
@ W = ( ${NV} - 2 ) / ( ${L} - 1 )

@ NE = ${NV} * ${avgd}
@ minNE = ${W} * ${L}

if ( ${NE} < ${minNE} ) then
  echo "average degree too low"; exit 1
endif

set name = /tmp/Blow.jcs

set echo
${bindir}unimf \
  -seed ${seed} ${flgs} \
  -subst 1.00 T -by Rete  -NV ${NV} -NE ${NE} -W ${W} -L ${L} \
  | sort -r



