Make most non-class functions static
These changes decrease the total size of the graph-tool libraries by 1.4 MB.
Before:
$ du -h `find -name *.so` | sort -h
20K ./src/graph/draw/.libs/libgt_pycairo_aux.so
1.4M ./src/graph/util/.libs/libgraph_tool_util.so
2.0M ./src/graph/clustering/.libs/libgraph_tool_clustering.so
2.4M ./src/graph/stats/.libs/libgraph_tool_stats.so
6.2M ./src/graph/draw/.libs/libgraph_tool_draw.so
9.1M ./src/graph/flow/.libs/libgraph_tool_flow.so
13M ./src/graph/centrality/.libs/libgraph_tool_centrality.so
13M ./src/graph/dynamics/.libs/libgraph_tool_dynamics.so
18M ./src/graph/layout/.libs/libgraph_tool_layout.so
18M ./src/graph/spectral/.libs/libgraph_tool_spectral.so
25M ./src/graph/search/.libs/libgraph_tool_search.so
29M ./src/graph/generation/.libs/libgraph_tool_generation.so
42M ./src/graph/correlations/.libs/libgraph_tool_correlations.so
60M ./src/graph/.libs/libgraph_tool_core.so
70M ./src/graph/topology/.libs/libgraph_tool_topology.so
372M ./src/graph/inference/.libs/libgraph_tool_inference.so
After:
$ du -h `find -name *.so` | sort -h
20K ./src/graph/draw/.libs/libgt_pycairo_aux.so
1.4M ./src/graph/util/.libs/libgraph_tool_util.so
1.8M ./src/graph/clustering/.libs/libgraph_tool_clustering.so
2.3M ./src/graph/stats/.libs/libgraph_tool_stats.so
6.1M ./src/graph/draw/.libs/libgraph_tool_draw.so
9.1M ./src/graph/flow/.libs/libgraph_tool_flow.so
13M ./src/graph/centrality/.libs/libgraph_tool_centrality.so
13M ./src/graph/dynamics/.libs/libgraph_tool_dynamics.so
17M ./src/graph/spectral/.libs/libgraph_tool_spectral.so
18M ./src/graph/layout/.libs/libgraph_tool_layout.so
25M ./src/graph/search/.libs/libgraph_tool_search.so
29M ./src/graph/generation/.libs/libgraph_tool_generation.so
42M ./src/graph/correlations/.libs/libgraph_tool_correlations.so
60M ./src/graph/.libs/libgraph_tool_core.so
70M ./src/graph/topology/.libs/libgraph_tool_topology.so
372M ./src/graph/inference/.libs/libgraph_tool_inference.so
I refrained from making any functions static that might be referenced in multiple compilation units.
Edited by Alex Henrie