Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
1885 lines (1568 sloc) 38.8 KB
#
# This is the Stu file with all targets for KONECT analysis.
#
# KONECT uses Stu instead of Make. Get Stu at https://github.com/kunegis/stu
#
# Important targets:
#
# @all Build everything
# @all.$class Build everything for one class; e.g.,
# @all.7 builds everything for the 70
# smallest networks
# @network.$network Build everything for one network
#
# Some commands use Matlab, others Octave, and yet other Julia. In
# general, we are migrating everything to Julia, but the bulk is still
# in Matlab.
#
% version 2.4
#
# General targets
#
@all: @all.everything;
@test: dat/check-meta @all.test;
@all.$class: [dat/dep.all.$class];
>dat/dep.all.$class: $[networks = dat/NETWORKS_CLASS_$class] $[SCATTERS]
{
for network in $networks ; do
echo @network."$network"
done
for scatter in $SCATTERS ; do
echo @scatter."$scatter".$class
done
}
@network.$network: @check.$network [dat/dep.network.$network];
>dat/dep.network.$network:
sh/dep-network
STATISTICS
dat/NETWORKS_SQUARE dat/NETWORKS_ASYM dat/NETWORKS_TIME
PLOTS PLOTS_SQUARE PLOTS_ASYM PLOTS_TIME
{
sh/dep-network
}
@plot.$network: [dat/dep.plot.$network];
>dat/dep.plot.$network:
sh/dep-network
dat/NETWORKS_SQUARE dat/NETWORKS_ASYM dat/NETWORKS_TIME
PLOTS PLOTS_SQUARE PLOTS_ASYM PLOTS_TIME
{
plots_only=1 sh/dep-network
}
#
# Matlab
#
>MATLABPATH:
{
printf "$PWD/m/:$PWD/konect-toolbox/m:$PWD/lib/:$PWD/lib/matlab_bgl/:$PWD/lib/wafo-statistics/:$PWD/lib/wafo-misc/:$PWD/lib/gridxy"
}
# TODO Remove the inner '-t' once this syntax is supported.
@matlab: -t (matlab $[-t MATLABPATH]);
#
# Perl
#
>PERL5LIB
{
printf pl:lib
}
#
# List of networks
#
>dat/NETWORKS: <dat/networks.asc
{
cut -f1 -d ' '
}
# For the next two targets, the fields are separated by space and
# described in sh/mkdatasetlist
# In ascending order of size
>dat/networks.asc: <dat/networks.list
{
sed -E -e 's,^(.*) ([0-9]+)$$,\2 \1,' | sort -n |
sed -E -e 's,^([0-9]+) (.*)$$,\2 \1,'
}
# In unspecified order
>dat/networks.list: sh/mkdatasetlist uni
{
sh/mkdatasetlist
}
dat/CLASSES: sh/classes dat/networks.asc
{
sh/classes
}
dat/NETWORKS_CLASS_$class: dat/CLASSES;
>dat/NETWORKS_BIP: dat/networks.asc
{
grep -E " bip " dat/networks.asc | cut -f1 -d ' '
}
>dat/NETWORKS_SYM: dat/networks.asc
{
grep -E " sym " dat/networks.asc | cut -f1 -d ' '
}
>dat/NETWORKS_ASYM: dat/networks.asc
{
grep -E " asym " dat/networks.asc | cut -f1 -d ' '
}
>dat/NETWORKS_SQUARE: dat/networks.asc
{
grep -E " (a|)sym " dat/networks.asc | cut -f1 -d ' '
}
>dat/NETWORKS_TIME: dat/networks.asc
{
grep ' t ' dat/networks.asc | cut -d ' ' -f 1
}
>dat/NETWORKS_CATEGORY_$category:
sh/category <dat/NETWORKS
{
sh/category
}
# List of networks in each weight class. $WEIGHTS is the weights (in all-lowercase).
>dat/NETWORKS_WEIGHTS_$weights:
dat/networks.asc
{
expr "$weights" : '[a-z]*' >/dev/null || {
echo >&2 "*** Weights '$weights' must be all lowercase"
exit 1
}
grep -F " $weights " dat/networks.asc | cut -d ' ' -f 1
}
# Networks that allow negative edges
>dat/NETWORKS_NEGATIVE:
sh/sort-networks dat/networks.asc
dat/NETWORKS_WEIGHTS_signed
dat/NETWORKS_WEIGHTS_multisigned
dat/NETWORKS_WEIGHTS_weighted
dat/NETWORKS_WEIGHTS_multiweighted
{
cat \
dat/NETWORKS_WEIGHTS_signed \
dat/NETWORKS_WEIGHTS_multisigned \
dat/NETWORKS_WEIGHTS_weighted \
dat/NETWORKS_WEIGHTS_multiweighted \
| sh/sort-networks
}
>dat/NETWORKS_ASYMNEGATIVE:
dat/NETWORKS_NEGATIVE dat/NETWORKS_ASYM
sh/intersect
{
sh/intersect dat/NETWORKS_NEGATIVE dat/NETWORKS_ASYM
}
>dat/NETWORKS_SQUARENEGATIVE:
dat/NETWORKS_NEGATIVE dat/NETWORKS_SQUARE
sh/intersect
{
sh/intersect dat/NETWORKS_NEGATIVE dat/NETWORKS_SQUARE
}
#
# C programs
#
CFLAGS=
# -D_GNU_SOURCE: for posix_madvise()
# -lm: used only in hyperanf.c / hyperloglog.h
{
-std=c99 -pedantic -Wall -Wextra -Werror
-Wundef -D_GNU_SOURCE
-lm
-O3 -DNDEBUG -s
}
bin/$name:
[dat/depc.$name.c] $[ -t CFLAGS] -p bin
{
gcc $CFLAGS c/$name.c -o bin/$name
}
bin/$name.$parameters:
[dat/depc.$name.c] $[ -t CFLAGS] -p bin
{
m="$(echo "$parameters" | sed -E -e 's,^(.).......$,\1,')"
u="$(echo "$parameters" | sed -E -e 's,^.(.)......$,\1,')"
v="$(echo "$parameters" | sed -E -e 's,^..(.).....$,\1,')"
w="$(echo "$parameters" | sed -E -e 's,^...(.)....$,\1,')"
t="$(echo "$parameters" | sed -E -e 's,^....(.)...$,\1,')"
F="$(echo "$parameters" | sed -E -e 's,^.....(.)..$,\1,')"
W="$(echo "$parameters" | sed -E -e 's,^......(.).$,\1,')"
L="$(echo "$parameters" | sed -E -e 's,^.......(.)$,\1,')"
gcc c/$name.c $CFLAGS -o bin/$name.$parameters \
-DTYPE_ma="'$m'" \
-DTYPE_ua="'$u'" -DTYPE_va="'$v'" \
-DTYPE_wa="'$w'" -DTYPE_ta="'$t'" \
-DFORMAT_a="$F" -DWEIGHTS_a="$W" -DLOOPS_a="$L"
}
bin/$name.$PARAMETERS.$PARAMETERS_2:
[dat/depc.$name.c] $[ -t CFLAGS] -p bin
{
m="$(echo "$PARAMETERS" | sed -E -e 's,^(.).......$,\1,')"
u="$(echo "$PARAMETERS" | sed -E -e 's,^.(.)......$,\1,')"
v="$(echo "$PARAMETERS" | sed -E -e 's,^..(.).....$,\1,')"
w="$(echo "$PARAMETERS" | sed -E -e 's,^...(.)....$,\1,')"
t="$(echo "$PARAMETERS" | sed -E -e 's,^....(.)...$,\1,')"
F="$(echo "$PARAMETERS" | sed -E -e 's,^.....(.)..$,\1,')"
W="$(echo "$PARAMETERS" | sed -E -e 's,^......(.).$,\1,')"
L="$(echo "$PARAMETERS" | sed -E -e 's,^.......(.)$,\1,')"
f="$PARAMETERS_2"
gcc $CFLAGS c/$name.c -o bin/$name.$PARAMETERS.$PARAMETERS_2 \
-DTYPE_ma="'$m'" \
-DTYPE_ua="'$u'" -DTYPE_va="'$v'" \
-DTYPE_wa="'$w'" -DTYPE_ta="'$t'" \
-DFORMAT_a="$F" -DWEIGHTS_a="$W" -DLOOPS_a="$L" \
-DTYPE_fa="'$f'"
}
bin/$name.x.$PARAMETERS_A.$PARAMETERS_B:
[dat/depc.$name.c] $[ -t CFLAGS] -p bin
{
ma="$(echo "$PARAMETERS_A" | sed -E -e 's,^(.).......$,\1,')"
ua="$(echo "$PARAMETERS_A" | sed -E -e 's,^.(.)......$,\1,')"
va="$(echo "$PARAMETERS_A" | sed -E -e 's,^..(.).....$,\1,')"
wa="$(echo "$PARAMETERS_A" | sed -E -e 's,^...(.)....$,\1,')"
ta="$(echo "$PARAMETERS_A" | sed -E -e 's,^....(.)...$,\1,')"
Fa="$(echo "$PARAMETERS_A" | sed -E -e 's,^.....(.)..$,\1,')"
Wa="$(echo "$PARAMETERS_A" | sed -E -e 's,^......(.).$,\1,')"
La="$(echo "$PARAMETERS_A" | sed -E -e 's,^.......(.)$,\1,')"
mb="$(echo "$PARAMETERS_B" | sed -E -e 's,^(.).......$,\1,')"
ub="$(echo "$PARAMETERS_B" | sed -E -e 's,^.(.)......$,\1,')"
vb="$(echo "$PARAMETERS_B" | sed -E -e 's,^..(.).....$,\1,')"
wb="$(echo "$PARAMETERS_B" | sed -E -e 's,^...(.)....$,\1,')"
tb="$(echo "$PARAMETERS_B" | sed -E -e 's,^....(.)...$,\1,')"
Fb="$(echo "$PARAMETERS_B" | sed -E -e 's,^.....(.)..$,\1,')"
Wb="$(echo "$PARAMETERS_B" | sed -E -e 's,^......(.).$,\1,')"
Lb="$(echo "$PARAMETERS_B" | sed -E -e 's,^.......(.)$,\1,')"
gcc c/$name.c $CFLAGS -o bin/$name.x.$PARAMETERS_A.$PARAMETERS_B \
-DTYPE_ma="'$ma'" \
-DTYPE_ua="'$ua'" -DTYPE_va="'$va'" \
-DTYPE_wa="'$wa'" -DTYPE_ta="'$ta'" \
-DFORMAT_a="$Fa" -DWEIGHTS_a="$Wa" -DLOOPS_a="$La" \
-DTYPE_mb="'$mb'" \
-DTYPE_ub="'$ub'" -DTYPE_vb="'$vb'" \
-DTYPE_wb="'$wb'" -DTYPE_tb="'$tb'" \
-DFORMAT_b="$Fb" -DWEIGHTS_b="$Wb" -DLOOPS_b="$Lb"
}
>c/$name.$X.h: <c/$name.h
{
echo "/* Automatically generated on $(date) */"
echo "#line 1 \"c/$name.h\""
sed -E -e 's,\$,'"$X"',g'
}
>c/$name.$X.$Y.h: <c/$name.h
{
echo "/* Automatically generated on $(date) */"
echo "#line 1 \"c/$name.h\""
sed -E -e 's,\$1,'"$X"',g;s,\$2,'"$Y"',g'
}
# List of files included by c/$FILE, directly or indirectly
>dat/depc.$file:
c/$file sh/depc
{
sh/depc c/$file
}
# The program to use for each application
>dat/dep.c.$name.$network:
dat/widths.$network
{
echo "bin/$name.$(cat dat/widths.$network)"
}
# Programs that need the additional degree width
>dat/dep.c2.$name.$network:
dat/widths.$network
dat/widths.ft.degree.$network
{
echo "bin/$name.$(cat dat/widths.$network).$(cat dat/widths.ft.degree.$network)"
}
# Transformers: Programs that have a second set of widths (B)
>dat/dep.cx.$name.$network.$transform:
dat/widths.$network
dat/widths.$transform~$network
{
echo "bin/$name.x.$(cat dat/widths.$network).$(cat dat/widths.$transform~$network)"
}
# Location of compiled files
bin
{
mkdir -p bin
}
#
# Bit widths
#
>dat/widths.$network:
sh/widths
$[ -t PERL5LIB]
uni/out.$network
dat/info.$network
{
sh/widths $network
}
#
# Info files
#
>dat/info.$network:
sh/network-info
<uni/out.$network
{
sh/network-info
}
>dat/info.$TRANSFORM~$network:
dat/statistic.format.$TRANSFORM~$network
dat/statistic.lines.$TRANSFORM~$network
dat/statistic.format.$TRANSFORM~$network
dat/statistic.weights.$TRANSFORM~$network
dat/statistic.size.$TRANSFORM~$network
{
FORMAT="$(cat dat/statistic.format.$TRANSFORM~$network)"
if [ "$FORMAT" = 3 ]; then # BIP
sed -E -e '1d;4~1d' <dat/statistic.size.$TRANSFORM~$network
else # SQUARE
sed -E -e '1!d' <dat/statistic.size.$TRANSFORM~$network
sed -E -e '1!d' <dat/statistic.size.$TRANSFORM~$network
fi
cat dat/statistic.lines.$TRANSFORM~$network
echo NaN
cat dat/statistic.format.$TRANSFORM~$network
cat dat/statistic.weights.$TRANSFORM~$network
}
#
# Check
#
@check: [dat/dep.check];
@check.$network: dat/check.$network;
dat/check.$network:
m/check.m $[ -t MATLABPATH]
uni/out.$network uni/meta.$network
dat/statistic.format.$network
dat/statistic.weights.$network
dat/statistic.size.$network
dat/statistic.lines.$network
{
./octave m/check.m && echo OK >dat/check.$network
}
>dat/dep.check: $[networks = dat/NETWORKS]
{
for network in $networks
do
echo @check."$network"
done
}
dat/check-meta: dat/NETWORKS sh/checkmeta
{
sh/checkmeta && touch dat/check-meta
}
#
# Data files
#
dat/data.$network.mat: uni/out.$network m/data.m
{
input="uni/out.$network" output="dat/data.$network.mat" ./matlab m/data.m
}
dat/data.$transform~$network.mat: dat/out.$transform~$network m/data.m
{
input="dat/out.$transform~$network" output="dat/data.$transform~$network.mat" \
./matlab m/data.m
}
#
# Out2 files, struct text files with exactly one tab as separator, and
# without comment lines. (Needed for Julia)
#
>dat/out2.$network: <uni/out.$network sh/out2
{
sh/out2
}
#
# OUT files for derived networks
#
dat/out.$transform~$network:
[dat/dep.c.sgraph1_dump.$transform~$network]
dat/sg1.$transform~$network
{
$(cat dat/dep.c.sgraph1_dump.$transform~$network) \
dat/sg1.$transform~$network dat/out.$transform~$network
}
#
# sg0 files
#
@sg0: [dat/dep.sg0];
>dat/dep.sg0: $[networks = dat/NETWORKS]
{
for network in $networks ; do echo $network ; done | sed -E -e 's,^,@sg0.,'
}
@sg0.$network: dat/sg0.$network;
dat/sg0.$network:
dat/widths.$network uni/out.$network dat/info.$network
$[command = dat/dep.c.sgraph0_create.$network] [dat/dep.c.sgraph0_create.$network]
{
$command uni/out.$network dat/sg0.$network $(head -3 dat/info.$network) "${TMPDIR-/tmp}"/c.sgraph0_create."$network".log
}
#
# sg1 files
#
@sg1: [dat/dep.sg1];
>dat/dep.sg1: $[networks = dat/NETWORKS]
{
for network in $networks ; do echo $network ; done | sed -E -e 's,^,@sg1.,'
}
@sg1.$network: dat/sg1.$network;
dat/sg1.$network:
$[command = dat/dep.c.sgraph1_create.$network] [dat/dep.c.sgraph1_create.$network]
dat/sg0.$network
{
## echo $command dat/sg0.$network dat/sg1.$network ## rm
$command dat/sg0.$network dat/sg1.$network "${TMPDIR-/tmp}"/c.sgraph1_create."$network".log
}
#
# Derived graphs
#
dat/sg1.simple~$network:
$[command = dat/dep.cx.sgraph1_create_simple.$network.simple]
[dat/dep.cx.sgraph1_create_simple.$network.simple]
dat/sg0.$network
{
$command dat/sg0.$network dat/sg1.simple~$network "${TMPDIR-/tmp}"/c.sgraph1_create_simple."$network".log
}
dat/sg1.lcc~$network:
$[command = dat/dep.c.sgraph1_create_lcc.$network] [dat/dep.c.sgraph1_create_lcc.$network]
dat/sg1.$network
{
$command dat/sg1.$network dat/sg1.lcc~$network "${TMPDIR-/tmp}"/c.sgraph1_create_lcc."$network".log
}
>dat/widths.simple~$network:
sh/widths-simple
$[ -t PERL5LIB]
dat/widths.$network
dat/statistic.size.$network
dat/statistic.volume.$network
{
sh/widths-simple
}
dat/widths.lcc~$network = dat/widths.$network;
#
# Split
#
dat/split.$network.mat:
uni/out.$network m/split.m dat/info.$network
$[ -t MATLABPATH]
{
./matlab m/split.m
}
#
# Means
#
dat/meansi.$network.mat: dat/data.$network.mat m/means.m dat/info.$network
$[ -t MATLABPATH]
{
type=full ./matlab m/means.m
}
dat/means.$network.mat: dat/split.$network.mat m/means.m dat/info.$network
$[ -t MATLABPATH]
{
type=split ./matlab m/means.m
}
dat/meanst.$network.mat: dat/split.$network.mat m/means.m dat/info.$network
$[ -t MATLABPATH]
{
type=training ./matlab m/means.m
}
#
# Assortativity plot
#
@assortativity: [dat/dep.assortativity];
>dat/dep.assortativity: $[networks = dat/NETWORKS]
{
for network in $networks ; do
echo @assortativity.$network
done
}
@assortativity.$network: plot/assortativity.a.$network.eps;
plot/assortativity.a.$network.eps:
m/assortativity.m m/assortativity_one.m $[ -t MATLABPATH]
dat/data.$network.mat
dat/info.$network
{
./matlab m/assortativity.m
}
#
# Statistics
#
@statistic.$statistic: [dat/dep.statistic.$statistic];
>dat/dep.statistic.$statistic:
[dat/dep.dep.statistic.$statistic] dat/dep.dep.statistic.$statistic
{
if [ ! -r "$(cat dat/dep.dep.statistic.$statistic)" ] ; then
exit 1
fi
networks="$(cat "$(cat dat/dep.dep.statistic.$statistic)")"
for network in $networks
do
echo @statistic.$statistic.$network
done
}
# The dat/NETWORKS{,_*} file to read
>dat/dep.dep.statistic.$statistic:
dat/statistic-attribute.$statistic
{
attribute="$(cat dat/statistic-attribute.$statistic)"
if [ -z "$attribute" ] ; then
echo dat/NETWORKS
else
echo "dat/NETWORKS_$attribute"
fi
}
# The group used for the given statistic, or empty when all networks
# should be used
>dat/statistic-attribute.$statistic:
sh/attribute [dat/dep.statistic-attribute.$statistic]
{
sh/attribute "$statistic"
}
>dat/dep.statistic-attribute.$statistic:
{
statistic_base="$(echo "$statistic" | sed -E -e 's,\+.+$,,')"
echo konect-toolbox/m/konect_statistic_"$statistic_base".m
}
@statistic.$statistic.$network: dat/statistic.$statistic.$network;
#
# Statistics implemented in Matlab (the default)
#
dat/statistic.$statistic.$network:
m/statistic_comp.m
$[ -t MATLABPATH]
dat/data.$network.mat dat/info.$network dat/meansi.$network.mat
konect-toolbox/m/konect_statistic_$statistic.m
{
./matlab m/statistic_comp.m
}
#
# Sub-statistics (taken from subsequent lines of the main
# statistic file). $K is the line number to take. Must be at least
# 2.
#
>dat/statistic.${statistic}+${K}.$network:
<dat/statistic.$statistic.$network
{
if [ "$K" -lt 2 ] ; then
echo >&2 'K must be at least 2'
exit 1
fi
if [ "$K" -gt "$(wc -l dat/statistic.$statistic.$network | cut -d' ' -f1)" ] ; then
echo >&2 'K cannot be larger than size of statistic file'
exit 1
fi
sed -E -e "$K"'!d'
}
#
# Basic statistics, which may have different implementations for simple~
# networks.
#
>dat/statistic.format.$network: sh/network-format <uni/out.$network
{
sh/network-format
}
>dat/statistic.format.$transform~$network:
<dat/widths.$transform~$network
{
sed -E -e 's,^.....(.)..$,\1,'
}
>dat/statistic.weights.$network: sh/network-weights <uni/out.$network
{
sh/network-weights
}
>dat/statistic.weights.$transform~$network:
<dat/widths.$transform~$network
{
sed -E -e 's,^......(.).$,\1,'
}
dat/statistic.size.$network: m/statistic_size.m dat/info.$network
$[ -t MATLABPATH]
{
./octave m/statistic_size.m
}
>dat/statistic.size.$transform~$network:
$[command = dat/dep.c.size.$transform~$network] [dat/dep.c.size.$transform~$network]
dat/sg1.$transform~$network
{
$command dat/sg1.$transform~$network "${TMPDIR-/tmp}"/c.size."$network".log
}
dat/statistic.lines.$network:
m/statistic_lines.m $[ -t MATLABPATH]
dat/info.$network
{
./octave m/statistic_lines.m
}
>dat/statistic.lines.$transform~$network:
$[command = dat/dep.c.lines.$transform~$network] [dat/dep.c.lines.$transform~$network]
dat/sg1.$transform~$network
{
$command dat/sg1.$transform~$network "${TMPDIR-/tmp}"/c.lines."$network".log
}
dat/statistic.volume.$network:
dat/info.$network
bin/statistic_volume
uni/out.$network
{
bin/statistic_volume
}
>dat/statistic.volume.$transform~$network:
$[command = dat/dep.c.volume.$transform~$network] [dat/dep.c.volume.$transform~$network]
dat/sg1.$transform~$network
{
$command dat/sg1.$transform~$network "${TMPDIR-/tmp}"/c.volume."$network".log
}
dat/statistic.volume.simple~$network = dat/statistic.volume.$network;
#
# Statistics with special code (simple expressions or C programs)
#
>dat/statistic.maxdegree.$network:
dat/sg1.$network
$[command = dat/dep.c.maxdegree.$network] [dat/dep.c.maxdegree.$network]
{
$command dat/sg1.$network "${TMPDIR-/tmp}"/c.maxdegree."$network".log
}
dat/statistic.triangles.$network = dat/statistic.triangles.simple~$network;
>dat/statistic.triangles.simple~$network:
dat/sg1.simple~$network
$[command = dat/dep.c.triangles.simple~$network] [dat/dep.c.triangles.simple~$network]
{
$command dat/sg1.simple~$network "${TMPDIR-/tmp}"/c.triangles."$network".log
}
>dat/statistic.twostars.simple~$network:
$[command = dat/dep.c2.statistic_twostars.simple~$network]
[dat/dep.c2.statistic_twostars.simple~$network]
dat/ft.degree.simple~$network
{
$command dat/ft.degree.simple~$network "${TMPDIR-/tmp}"/c.statistic_twostars."$network".log
}
dat/statistic.twostars.$network = dat/statistic.twostars.simple~$network;
>dat/statistic.twostars_norm_d.$network:
dat/statistic.twostars.$network
dat/statistic.size.$network
dat/statistic.avgdegree.$network
{
s="$(head -1 dat/statistic.twostars.$network)"
n="$(head -1 dat/statistic.size.$network)"
d="$(head -1 dat/statistic.avgdegree.$network)"
echo $s $n $d | awk '{ printf "%.12f\n", 2 * $1 / $2 / $3 / ($3 - 1) }'
}
>dat/statistic.clusco.$network:
dat/statistic.triangles.$network
dat/statistic.twostars.$network
{
t="$(head -1 dat/statistic.triangles.$network)"
s="$(head -1 dat/statistic.twostars.$network)"
echo $t $s | awk '{ printf "%.12f\n", 3 * $1 / $2 }'
}
dat/statistic.avgdegree.$network:
m/statistic_avgdegree.m $[ -t MATLABPATH]
dat/statistic.volume.$network
dat/statistic.size.$network
dat/statistic.format.$network
{
./matlab m/statistic_avgdegree.m
}
dat/statistic.ifub$K.lcc~simple~$network:
$[command = dat/dep.c.ifub.lcc~simple~$network]
[dat/dep.c.ifub.lcc~simple~$network]
dat/sg1.lcc~simple~$network
{
"$command" dat/sg1.lcc~simple~"$network" dat/statistic.ifub"$K".lcc~simple~"$network" "$K" "${TMPDIR:-/tmp}"/c.ifub."$network".log
}
dat/statistic.ifub$K.simple~$network = dat/statistic.ifub$K.lcc~simple~$network;
dat/statistic.ifub$K.$network = dat/statistic.ifub$K.simple~$network;
dat/statistic.diam.$network = dat/statistic.ifub0.$network;
>dat/statistic.relmaxdegree.$network:
dat/statistic.maxdegree.$network
dat/statistic.avgdegree.$network
{
d_max="$(head -1 dat/statistic.maxdegree.$network)"
d="$(head -1 dat/statistic.avgdegree.$network)"
echo $d_max $d | awk '{ printf "%.12f\n", $1 / $2 }'
}
>dat/statistic.coco.$network:
dat/statistic.coco.simple~$network
{
coco="$(head -1 dat/statistic.coco.simple~$network)"
echo $coco
}
>dat/statistic.coco.simple~$network:
dat/statistic.size.lcc~simple~$network
{
head -1 dat/statistic.size.lcc~simple~$network
}
>dat/statistic.cocorel.$network:
dat/statistic.coco.$network
dat/statistic.size.$network
{
coco="$(head -1 dat/statistic.coco.$network)"
n="$(head -1 dat/statistic.size.$network)"
echo $coco $n | awk '{ printf "%.12f\n", $1 / $2 }'
}
>dat/statistic.cocorelinv.$network:
dat/statistic.coco.$network
dat/statistic.size.$network
{
coco="$(head -1 dat/statistic.coco.$network)"
n="$(head -1 dat/statistic.size.$network)"
echo $coco $n | awk '{ printf "%.12f\n", 1.0 - ($1) / ($2 + 1) }'
}
dat/statistic.meandist.$network:
m/statistic_meandist.m $[ -t MATLABPATH]
dat/hopdistr2.$network
{
./octave m/statistic_meandist.m
}
dat/statistic.diameff$percentile.$network:
m/statistic_diameff.m $[ -t MATLABPATH]
dat/hopdistr2.$network
{
./octave m/statistic_diameff.m
}
#
# Statistics derived from decompositions
#
dat/statistic.oddcycles.$network:
m/statistic_comp_spectral.m $[ -t MATLABPATH]
dat/info.$network
dat/decomposition.symabs.$network.mat
{
statistic=oddcycles decomposition=symabs \
./matlab m/statistic_comp_spectral.m
}
#
# Statistics over time.
#
# $TYPE can be 'full' or 'split'. (The split case is not yet migrated
# from the Makefile.)
#
@statistic_time.$type.$statistic.$network:
plot/statistic_time.$type.a.$statistic.$network.eps;
@statistic_time.$type.$statistic: [dat/dep.statistic_time.$type.$statistic];
>dat/dep.statistic_time.$type.$statistic:
[dat/dep.dep.statistic.$statistic]
sh/intersect
dat/NETWORKS_TIME
{
if [ ! -r "$(cat dat/dep.dep.statistic.$statistic)" ] ; then
exit 1
fi
networks="$(sh/intersect dat/NETWORKS_TIME "$(cat dat/dep.dep.statistic.$statistic)")"
for network in $networks
do
echo @statistic_time.$type.$statistic.$network
done
}
dat/statistic_time.full.$statistic.$network:
m/statistic_time.m
$[ -t MATLABPATH]
dat/data.$network.mat
dat/info.$network
dat/stepsi.$network
dat/meansi.$network.mat
{
type=full ./matlab m/statistic_time.m
}
>dat/statistic_time.full.${statistic}+${k}.$network:
<dat/statistic_time.full.$statistic.$network
{
expr "$k" : '[0-9][0-9]*' >/dev/null || {
echo >&2 "*** Invalid K='$k'"
exit 1
}
sed -E -e 's,\s+, ,g' |
cut -d ' ' -f "$k"
cp dat/statistic_time_runtime.full.$statistic.$network \
dat/statistic_time_runtime.full.${statistic}+${k}.$network
}
plot/statistic_time.full.a.$statistic.$network.eps:
m/statistic_time_plot.m
$[ -t MATLABPATH]
dat/statistic_time.full.$statistic.$network
dat/stepsi.$network
{
type=full ./matlab m/statistic_time_plot.m
}
#
# Feature: degree
#
# An array of items
@ft.$feature.$network: dat/ft.$feature.$network;
dat/ft.degree.$network:
[dat/dep.c2.feature_degree.$network]
dat/sg1.$network
{
$(cat dat/dep.c2.feature_degree.$network) dat/sg1.$network dat/ft.degree.$network
}
>dat/widths.ft.degree.$network:
sh/widths-one $[ -t PERL5LIB]
dat/statistic.volume.$network
{
sh/widths-one $(cat dat/statistic.volume.$network)
}
#
# Scatter
#
@scatter.$statistic_x.$statistic_y.$class:
plot/scatter.a.$statistic_x.$statistic_y.$class.eps;
@scatter.$statistic_x.$statistic_y:
[dat/dep.scatter.$statistic_x.$statistic_y];
plot/scatter.$type.$statistic_x.$statistic_y.$class.eps:
$[ -t MATLABPATH]
m/scatter_comp.m m/scatter_plot.m m/scatter_single.m
konect-toolbox/m/konect_data_statistic.m
konect-toolbox/m/konect_label_statistic.m
[dat/dep.scatter.$statistic_x.$statistic_y.$class]
dat/NETWORKS.$statistic_x.$statistic_y.$class
{
networks="$(cat dat/NETWORKS.$statistic_x.$statistic_y.$class)" \
kind="$statistic_x.$statistic_y" \
./matlab m/scatter_comp.m
}
>dat/dep.scatter.$statistic_x.$statistic_y:
dat/CLASSES
{
for class in $(cat dat/CLASSES)
do
echo "@scatter.$statistic_x.$statistic_y.$class"
done
}
>dat/NETWORKS.$statistic_x.$statistic_y.$class:
dat/NETWORKS_CLASS_$class
dat/statistic-attribute.$statistic_x
dat/statistic-attribute.$statistic_y
{
networks="$(cat dat/NETWORKS_CLASS_$class)"
attribute_x="$(cat dat/statistic-attribute.$statistic_x)"
if [ "$attribute_x" ]
then
networks_old="$networks"
networks=
for network in $networks_old
do
if grep -Eq '^'"$network"'$' "dat/NETWORKS_$attribute_x"
then
networks="$networks $network"
fi
done
fi
attribute_y="$(cat dat/statistic-attribute.$statistic_y)"
if [ "$attribute_y" ]
then
networks_old="$networks"
networks=
for network in $networks_old
do
if grep -Eq '^'"$network"'$' "dat/NETWORKS_$attribute_y"
then
networks="$networks $network"
fi
done
fi
for network in $networks
do
echo "$network"
done
}
>dat/dep.scatter.$statistic_x.$statistic_y.$class:
dat/NETWORKS.$statistic_x.$statistic_y.$class
{
for network in $(cat dat/NETWORKS.$statistic_x.$statistic_y.$class)
do
echo dat/statistic.$statistic_x.$network
echo dat/statistic.$statistic_y.$network
done
}
#
# Category table
#
tex/category-tabular.tex:
m/mkcategory.m
$[ -t MATLABPATH]
dat/NETWORKS
[tex/dep.category-tabular.tex]
{
NETWORKS="$(cat dat/NETWORKS)" ./matlab m/mkcategory.m
}
>tex/dep.category-tabular.tex:
dat/NETWORKS
{
for network in $(cat dat/NETWORKS) ; do
echo uni/meta.$network dat/statistic.format.$network dat/statistic.weights.$network
done
}
#
# Bidd (cumulated degree distribution)
#
@bidd: [dat/dep.bidd];
>dat/dep.bidd: dat/NETWORKS
{
for network in $(cat dat/NETWORKS) ; do
echo @bidd."$network"
done
}
@bidd.$network
plot/bidd.a.$network.eps:
m/bidd.m m/bidd_one.m
$[ -t MATLABPATH]
dat/info.$network
dat/data.$network.mat
{
./matlab m/bidd.m
}
#
# Layout
#
@layout: @layout.class.everything;
@layout.class.$class: [dat/dep.layout.class.$class];
@layout.$network
plot/layout.a.$network.eps:
m/layout.m
dat/data.$network.mat
dat/info.$network
$[ -t MATLABPATH]
{
./matlab m/layout.m
}
>dat/dep.layout.class.$class: dat/NETWORKS_CLASS_$class
{
for network in $(cat dat/NETWORKS_CLASS_$class) ; do
echo @layout."$network"
done
}
#
# Degree
#
@degree.$network: plot/degree.a.$network.eps;
plot/degree.a.$network.eps:
m/degree.m m/degree_print.m $[ -t MATLABPATH]
dat/info.$network dat/data.$network.mat
{
./matlab m/degree.m
}
@degreex.$network: plot/degree.ax.$network.eps;
plot/degree.ax.$network.eps:
m/degree.m m/degree_print.m $[ -t MATLABPATH]
dat/data.$network.mat dat/info.$network
dat/statistic.power.$network
{
ENABLE_POWER_LAW=1 ./matlab m/degree.m
}
@degreey.$network: plot/degree.ay.$network.eps;
plot/degree.ay.$network.eps:
m/degree.m m/degree_print.m $[ -t MATLABPATH]
dat/data.$network.mat dat/info.$network
dat/statistic.power2.$network
{
ENABLE_POWER_LAW_2=1 ./matlab m/degree.m
}
@degree3.$network: plot/degree.a3.$network.eps;
plot/degree.a3.$network.eps:
m/degree.m m/degree_print.m $[ -t MATLABPATH]
dat/data.$network.mat dat/info.$network
dat/statistic.power3.$network
{
ENABLE_POWER_LAW_3=1 ./matlab m/degree.m
}
#
# Lorenz plot
#
@lorenz.$network
plot/lorenz.a.$network.eps:
m/lorenz.m m/lorenz_one.m
dat/info.$network
dat/data.$network.mat
$[ -t MATLABPATH]
{
./matlab m/lorenz.m
}
#
# Weight distribution
#
@weights.$network
plot/weights.a.$network.eps:
m/weights_plot.m $[ -t MATLABPATH]
dat/data.$network.mat
{
./matlab m/weights_plot.m
}
#
# Time histogram
#
>dat/time.$network:
<uni/out.$network
-t dat/NETWORKS_TIME
{
if ! grep -qE '^'"$network"'$' dat/NETWORKS_TIME ; then
exit 1
fi
sed -E -e 's,[0-9]+\s+[0-9]+\s+[^ ]+\s+([0-9-]+),\1,'
}
@time_histogram.$network
plot/time_histogram.$network.eps:
m/time_histogram.m $[ -t MATLABPATH]
dat/time.$network
uni/meta.$network
{
./matlab m/time_histogram.m
}
@time_histogram: [dat/dep.time_histogram];
>dat/dep.time_histogram:
dat/NETWORKS_TIME
{
for network in $(cat dat/NETWORKS_TIME) ; do
echo @time_histogram."$network"
done
}
#
# Signed time histogram
#
@time_histogram_signed.$network
plot/time_histogram_signed.a.$network.eps:
m/time_histogram_signed.m $[ -t MATLABPATH]
uni/out.$network
uni/meta.$network
{
./matlab m/time_histogram_signed.m
}
@time_histogram_signed: [dat/dep.time_histogram_signed];
>dat/dep.time_histogram_signed:
dat/NETWORKS_TIME
dat/NETWORKS_WEIGHTS_signed dat/NETWORKS_WEIGHTS_dynamic
{
for network in $(cat dat/NETWORKS_TIME) ; do
if grep -qE '^\s*'"$network"'\s*$' dat/NETWORKS_WEIGHTS_signed ||
grep -qE '^\s*'"$network"'\s*$' dat/NETWORKS_WEIGHTS_dynamic ; then
echo @time_histogram_signed."$network"
fi
done
}
#
# Diadens
#
@diadens.$network
plot/diadens.$network.eps:
m/diadens.m
$[ -t MATLABPATH]
dat/stepsi.$network
dat/statistic_time.full.diameter.$network
dat/statistic_time.full.avgdegree.$network
{
./matlab m/diadens.m
}
#
# Clustering coefficient distribution
#
@cluscod: [dat/dep.cluscod];
dat/cluscod.$network.mat:
m/cluscod.m $[ -t MATLABPATH]
dat/info.$network
dat/data.$network.mat
{
./matlab m/cluscod.m
}
@cluscod.$network
plot/cluscod.a.$network.eps:
m/cluscod_plot.m $[ -t MATLABPATH]
dat/cluscod.$network.mat
{
./matlab m/cluscod_plot.m
}
>dat/dep.cluscod: dat/NETWORKS_SQUARE
{
for network in $(cat dat/NETWORKS_SQUARE) ; do
echo @cluscod."$network"
done
}
#
# Distance distribution
#
@hopdistr: [dat/dep.hopdistr];
>dat/dep.hopdistr: dat/NETWORKS
{
for network in $(cat dat/NETWORKS) ; do
echo @hopdistr."$network"
done
}
@hopdistr.square: [dat/dep.hopdistr.square];
>dat/dep.hopdistr.square: dat/NETWORKS_SQUARE
{
for network in $(cat dat/NETWORKS_SQUARE) ; do
echo @hopdistr.$network
done
}
dat/hopdistr2.$network = dat/hopdistr2.simple~$network;
dat/hopdistr2.simple~$network = dat/hopdistr2.lcc~simple~$network;
>dat/hopdistr2.lcc~simple~$network:
dat/sg1.lcc~simple~$network
$[command = dat/dep.c.hyperanf.lcc~simple~$network]
[dat/dep.c.hyperanf.lcc~simple~$network]
{
"$command" dat/sg1.lcc~simple~"$network" "${TMPDIR-/tmp}"/c.hyperanf."$network".log
}
@hopdistr.$network
plot/hopdistr.a.$network.eps:
m/hopdistr_plot.m $[ -t MATLABPATH]
dat/hopdistr2.$network
{
./matlab m/hopdistr_plot.m
}
dat/hopdistr_distrtest.$network.mat:
m/hopdistr_distrtest.m m/distrtest_multi.m $[ -t MATLABPATH]
dat/hopdistr2.$network
dat/info.$network
{
./matlab m/hopdistr_distrtest.m
}
dat/hopdistr_time.full.$network:
m/hopdistr_time_comp.m $[ -t MATLABPATH]
dat/data.$network.mat
dat/info.$network
dat/stepsi.$network
{
type=full ./matlab m/hopdistr_time_comp.m
}
@hopdistr_time.full.$network
plot/hopdistr_time.full.a.$network.eps:
m/hopdistr_time_plot.m $[ -t MATLABPATH]
dat/hopdistr_time.full.$network
{
type=full ./matlab m/hopdistr_time_plot.m
}
#
# Steps
#
# Full
dat/stepsi.$network:
m/stepsi.m $[ -t MATLABPATH]
dat/info.$network
dat/outs.$network
{
./matlab m/stepsi.m
}
# Split
dat/steps.$network.mat:
m/steps.m $[ -t MATLABPATH]
dat/split.$network.mat
dat/means.$network.mat
{
./matlab m/steps.m
}
#
# Sorted out file
#
dat/outs.$network:
uni/out.$network
bin/outs
-t dat/NETWORKS_TIME
{
if ! grep '^'"$network"'$' dat/NETWORKS_TIME ; then
exit 1
fi
bin/outs "$network"
}
#
# Decompositions
#
@decomposition.$decomposition.$network: plot/decomposition.a.$decomposition.$network.eps;
dat/decomposition.$decomposition.$network.mat:
m/decomposition_comp.m $[ -t MATLABPATH]
dat/data.$network.mat
dat/info.$network
dat/meansi.$network.mat
dat/runtime
{
./matlab m/decomposition_comp.m
}
dat/decomposition_map.$decomposition.$network.mat:
m/decomposition_comp.m $[ -t MATLABPATH]
dat/data.$network.mat
dat/info.$network
dat/meansi.$network.mat
dat/runtime
{
./matlab m/decomposition_map.m
}
plot/decomposition.a.$decomposition.$network.eps:
m/decomposition_plot.m $[ -t MATLABPATH]
dat/decomposition.$decomposition.$network.mat
{
./matlab m/decomposition_plot.m
}
@decomposition.$decomposition: [dat/dep.decomposition.$decomposition];
>dat/dep.decomposition.$decomposition:
dat/NETWORKS
dat/NETWORKS_ASYM
DECOMPOSITIONS_ASYM
{
if grep -qE '^\s*'"$decomposition"'\s*$' DECOMPOSITIONS_ASYM ; then
networks="$(cat dat/NETWORKS_ASYM)"
else
networks="$(cat dat/NETWORKS)"
fi
for network in $networks ; do
echo @decomposition."$decomposition"."$network"
done
}
#
# Preferential attachment exponent statistics
#
dat/statistic.prefatt.$network:
m/statistic_full_prefatt.m $[ -t MATLABPATH]
dat/pa.$network.mat
{
./matlab m/statistic_full_prefatt.m
}
dat/pa.$network.mat:
m/pa_compute.m m/pa_compute_one.m $[ -t MATLABPATH]
dat/split.$network.mat dat/info.$network
{
./matlab m/pa_compute.m
}
dat/pa_data.$network.mat: dat/pa.$network.mat;
#
# Preferential attachment plots
#
@pa: [dat/dep.pa];
>dat/dep.pa: dat/NETWORKS_TIME
{
cat dat/NETWORKS_TIME |
while read -r network ; do
echo @pa."$network"
done
}
@pa.$network
plot/pa.aa.$network.eps:
m/pa_plot.m m/pa_plot_one.m dat/pa.$network.mat
dat/pa_data.$network.mat dat/split.$network.mat dat/info.$network
$[ -t MATLABPATH]
{
./matlab m/pa_plot.m
}
#
# Spectral distribution
#
@distr.$decomposition.$network
plot/distr.a.$decomposition.$network.eps:
m/distr_plot.m $[ -t MATLABPATH]
dat/distr.$decomposition.$network
{
./matlab m/distr_plot.m
}
dat/distr.$decomposition.$network:
m/distr.m
$[ -t MATLABPATH]
dat/info.$network
dat/data.$network.mat
dat/meansi.$network.mat
{
./matlab m/distr.m
}
#
# Maps (graph drawings based on matrix decompositions)
#
@map.$decomposition.$network
plot/map.a.$decomposition.$network.eps:
m/map.m
m/map_one.m
$[ -t MATLABPATH]
dat/decomposition_map.$decomposition.$network.mat
{
./matlab m/map.m
}
@map.$decomposition: [dat/dep.map.$decomposition];
>dat/dep.map.$decomposition:
dat/NETWORKS
dat/NETWORKS_ASYM
DECOMPOSITIONS_ASYM
{
if grep -qE '^\s*'"$decomposition"'\s*$' DECOMPOSITIONS_ASYM ; then
networks="$(cat dat/NETWORKS_ASYM)"
else
networks="$(cat dat/NETWORKS)"
fi
for network in $networks ; do
echo @map."$decomposition"."$network"
done
}
#
# RDF files
#
@rdf.$network: dat/download.rdf.$network.n3.bz2;
>dat/download.rdf.$network.n3.bz2: dat/download.rdf.$network.n3
{
bzip2 -c dat/download.rdf."$network".n3
}
>dat/download.rdf.$network.n3: uni/out.$network uni/meta.$network sh/mkrdf
{
sh/mkrdf "$network"
head dat/download.rdf."$network".n3 -n 10000 |
rdfpipe --stdin --input-format n3 --output n3 >/dev/null
}
@rdf: [dat/dep.rdf];
>dat/dep.rdf: dat/NETWORKS
{
grep -El '^\s*n3-prefix-m\s*:' uni/meta.* |
sed -E -e 's,^uni/meta\.,@rdf.,'
}
#
# TSV files
#
@tsv.$network: dat/download.tsv.$network.tar.bz2;
>dat/README.$network:
sh/mkreadme sh/mkcite $[ -t PERL5LIB]
lib/BibTeX/Parser.pm lib/LaTeX/ToUnicode.pm lib/HTML/Entities.pm
-p ( konect-handbook konect-extr )
{
sh/mkreadme "$network" matrices
}
lib/HTML/Entities.pm: lib/HTML-Parser-3.72.tar.gz
{
cd lib
tar -xf HTML-Parser-3.72.tar.gz
mv HTML-Parser-3.72/lib/HTML ./
rm -rf HTML-Parser-3.72
touch HTML/Entities.pm
}
lib/HTML-Parser-3.72.tar.gz: -p lib
{
cd lib
wget https://cpan.metacpan.org/authors/id/G/GA/GAAS/HTML-Parser-3.72.tar.gz
touch HTML-Parser-3.72.tar.gz
}
lib/BibTeX-Parser-0.67.tar.gz: -p lib
{
cd lib
wget https://cpan.metacpan.org/authors/id/B/BO/BORISV/BibTeX-Parser-0.67.tar.gz
touch BibTeX-Parser-0.67.tar.gz
}
lib/BibTeX/Parser.pm: lib/BibTeX-Parser-0.67.tar.gz
{
cd lib
tar -xf BibTeX-Parser-0.67.tar.gz
mv BibTeX-Parser-0.67/lib/BibTeX ./
rm -rf BibTeX-Parser-0.67
touch BibTeX/Parser.pm
}
lib/LaTeX/ToUnicode.pm: lib/LaTeX-ToUnicode-0.04.tar.gz
{
cd lib
tar -xf LaTeX-ToUnicode-0.04.tar.gz
mv LaTeX-ToUnicode-0.04/lib/LaTeX ./
rm -rf LaTeX-ToUnicode-0.04
touch LaTeX/ToUnicode.pm
}
lib/LaTeX-ToUnicode-0.04.tar.gz: -p lib
{
cd lib
wget https://cpan.metacpan.org/authors/id/B/BO/BORISV/LaTeX-ToUnicode-0.04.tar.gz
touch LaTeX-ToUnicode-0.04.tar.gz
}
>dat/dep.download.tsv.$network:
{
echo dat/README."$network"
echo uni/out."$network"
echo uni/meta."$network"
if [ -e uni/ent."$network" ]
then
echo uni/ent."$network"
fi
if ls uni/ent."$network".* >/dev/null 2>/dev/null
then
echo uni/ent."$network".*
fi
if ls uni/rel."$network".* >/dev/null 2>/dev/null
then
echo uni/rel."$network".*
fi
}
dat/download.tsv.$network.tar.bz2:
[dat/dep.download.tsv.$network]
-p dat-tmp
{
DIR="dat-tmp/$network"
rm -Rf "$DIR"
mkdir "$DIR"
for file in $(cat dat/dep.download.tsv."$network")
do
file_canon="$(readlink -e "$file")"
if [ "$(basename "$file_canon")" = README ]
then
ln -s "$file_canon" "$DIR"/README
else
ln -s "$file_canon" "$DIR"/
fi
done
cd dat-tmp
tar -hcvj -f ../dat/download.tsv."$network".tar.bz2 "$network"
rm -rf "dat-tmp/$network"
}
dat-tmp;
@tsv: [dat/dep.tsv];
>dat/dep.tsv:
dat/NETWORKS
dat/allowed_src.txt
{
cat dat/NETWORKS |
while read -r network
do
if <dat/allowed_src.txt sed -E -e '/,matrix/!d;s/^(.*),.*$/\1/' |
grep -qE '^'"$network"'$'
then
echo "@tsv.$network"
fi
done
}
#
# Delaunay
#
@delaunay.$network
plot/delaunay.a.$network.png:
m/delaunay_plot.m
$[ -t MATLABPATH]
dat/data.$network.mat
dat/info.$network
{
jvm_enable=1 ./matlab m/delaunay_plot.m
}
@delaunay: [dat/dep.delaunay];
>dat/dep.delaunay: dat/NETWORKS
{
for network in $(cat dat/NETWORKS) ; do
echo @delaunay.$network
done
}
#
# Lybl
#
@lybl.$network: plot/lybl.a.$network.png;
plot/lybl.a.$network.png:
m/lybl.m
$[ -t MATLABPATH]
dat/info.$network
dat/data.$network.mat
dat/decomposition_map.stoch.$network.mat
{
./matlab m/lybl.m
}
@lybl: [dat/dep.lybl];
>dat/dep.lybl: dat/NETWORKS
{
for network in $(cat dat/NETWORKS) ; do
echo @lybl."$network"
done
}
#
# SynGraphy: small synthetic networks generated to have similar
# characteristics as the actual networks.
#
@syngraphy.$network
plot/syngraphy.a.$network.eps:
m/syngraphy_plot.m
$[ -t MATLABPATH]
dat/statistic.size.$network
dat/statistic.uniquevolume.$network
dat/statistic.twostars.$network
dat/statistic.threestars.$network
dat/statistic.fourstars.$network
dat/statistic.triangles.$network
dat/statistic.squares.$network
{
./matlab m/syngraphy_plot.m
}
@syngraphy: [dat/dep.syngraphy];
>dat/dep.syngraphy:
dat/NETWORKS_ASYM
{
for network in $(cat dat/NETWORKS_ASYM) ; do
echo @syngraphy."$network"
done
}
#
# Out- vs indegree plot for directed networks
#
@outin: [dat/dep.outin];
@outin.$network: plot/outin.a.$network.eps;
plot/outin.a.$network.eps:
m/outin.m $[-t MATLABPATH]
dat/data.$network.mat
dat/info.$network
{
./matlab m/outin.m
}
>dat/dep.outin:
dat/NETWORKS_ASYM
{
for network in $(cat dat/NETWORKS_ASYM) ; do
echo @outin."$network"
done
}
#
# Runtime
#
>tmp.runtime: sh/mkstat <runtime.source
{
sh/mkstat
}
dat/runtime: tmp.runtime m/runtime.m
{
./octave m/runtime.m
}
#
# Zipf plots
#
@zipf: [dat/dep.zipf];
>dat/dep.zipf: <dat/NETWORKS
{
sed -E -e 's,^,@zipf.,'
}
@zipf.$network
plot/zipf.a.$network.eps:
m/zipf.m m/zipf_one.m $[ -t MATLABPATH]
dat/data.$network.mat dat/info.$network
{
./matlab m/zipf.m
}
#
# Bipartivity -- opposite of nonbipartivity.
#
>dat/statistic.bip.$network: dat/statistic.nonbip.$network
{
head -1 dat/statistic.nonbip."$network" | awk '{printf "%.12f\n", 1.0 - $1}'
}
#
# Global inter-event distribution
#
@inter: [dat/dep.inter];
>dat/dep.inter: <dat/NETWORKS_TIME { sed -e 's,^,@inter.,' }
@inter.$network
plot/inter.a.$network.png: dat/out2.$network jl/inter.jl
{
./julia jl/inter.jl
}
#
# Per-node inter-event distribution
#
@inter2: [dat/dep.inter2];
>dat/dep.inter2: <dat/NETWORKS_TIME { sed -e 's,^,@inter2.,' }
@inter2.$network
plot/inter2.a.$network.png:
dat/out2.$network jl/inter2.jl
dat/statistic.format.$network
{
./julia jl/inter2.jl
}
#
# PNG - PNG versions of EPS files
#
plot/$name.png: plot/$name.eps sh/eps2png
{
sh/eps2png plot/"$name".eps plot/"$name".png
}
#
# Degree vs local clustering coefficient
#
@degcc: [dat/dep.degcc];
>dat/dep.degcc: dat/NETWORKS_SQUARE
{
for network in $(cat dat/NETWORKS_SQUARE) ; do
echo @degcc."$network"
done
}
@degcc.$network: plot/degcc.a.$network.eps;
plot/degcc.a.$network.eps:
m/degcc.m $[-t MATLABPATH]
dat/cluscod.$network.mat
uni/out.$network
{
./matlab m/degcc.m
}