-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
124 lines (93 loc) · 2.58 KB
/
Makefile
File metadata and controls
124 lines (93 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
OUTDIR := output
DATA := data
ARGS = $(INPUT) $(OUTDIR)
# EXAMPLE
.PHONY: example
example: INPUT := $(DATA)/example.txt
example: FLAGS := -w --teleportation-probability 0 $(ARGS)
example: clean all_representations
# MINIMAL EXAMPLE
.PHONY: minimal
minimal: INPUT := $(DATA)/minimal.txt
minimal: FLAGS := -w --teleportation-probability 0.15 $(ARGS)
minimal: clean weighted_representations
# EXAMPLE FOR PAPER
.PHONY: example_for_paper
example_for_paper: INPUT := $(DATA)/example-paper.txt
example_for_paper: FLAGS := -w -2 --teleportation-probability 0.15 $(ARGS)
example_for_paper: clean weighted_representations
# REFERENCES
.PHONY: references references_weighted
REFS := $(DATA)/references.txt
REFS_WEIGHTED := $(DATA)/references-weighted.txt
TEX_FILE := $(DATA)/networks-beyond-pairwise-interactions-references.tex
$(REFS):
python -m references --omega log-citations $(TEX_FILE) $(REFS)
$(REFS_WEIGHTED):
python -m references --omega log-citations --gamma-weighted $(TEX_FILE) $(REFS_WEIGHTED)
references_weighted: INPUT := $(REFS_WEIGHTED)
references_weighted:
@$(MAKE) clean
@$(MAKE) $(REFS_WEIGHTED)
@$(MAKE) weighted_representations FLAGS="--num-trials 100 --largest-cc $(ARGS)"
# SEEDS
SEEDS = 1 2 3 4 5 6 7 8 9 10
.PHONY: seeds $(SEEDS)
seeds:
@$(MAKE) clean
@$(MAKE) $(REFS)
@$(MAKE) $(SEEDS)
$(SEEDS): INPUT := $(REFS)
$(SEEDS):
@$(MAKE) all_representations FLAGS="--seed $(@) $(ARGS)"
# REPRESENTATIONS
RUN := python -m hypergraph
.PHONY: \
all_representations \
weighted_representations \
bipartite \
bipartite_non_backtracking \
unipartite_undirected \
unipartite_undirected_self_links \
unipartite_directed \
unipartite_directed_self_links \
multilayer \
multilayer_self_links
weighted_representations: \
bipartite \
bipartite_non_backtracking \
unipartite_directed \
unipartite_directed_self_links \
multilayer \
multilayer_self_links \
multilayer_similarity \
multilayer_similarity_self_links
all_representations: \
weighted_representations \
unipartite_undirected \
unipartite_undirected_self_links
bipartite:
$(RUN) -b $(FLAGS)
bipartite_non_backtracking:
$(RUN) -B $(FLAGS)
unipartite_undirected:
$(RUN) -u $(FLAGS)
unipartite_undirected_self_links:
$(RUN) -uk $(FLAGS)
unipartite_directed:
$(RUN) -U $(FLAGS)
unipartite_directed_self_links:
$(RUN) -Uk $(FLAGS)
multilayer:
$(RUN) -m $(FLAGS)
multilayer_self_links:
$(RUN) -mk $(FLAGS)
multilayer_similarity:
$(RUN) -M $(FLAGS)
multilayer_similarity_self_links:
$(RUN) -Mk $(FLAGS)
# CLEAN
.PHONY: clean
clean:
$(RM) -r $(OUTDIR)/*.{clu,tree,ftree,net}
$(RM) -r $(OUTDIR)/**/*.{clu,tree,ftree,net}