While the network code can be used independently from the epidemiological code and vice versa—they are conceptually and functionally distinct—from the beginning, the libraries were developed to be compatible with each other. What EpiFire excels at is simulating the stochastic spread of disease on contact networks. An open-access manuscript describing EpiFire is available.
The Network, Node, and Edge classes provide several dozen methods for constructing, manipulating, and describing networks.
Network input/output is done using edgelist files, where each line corresponds to one edge. For example, a file containing the line “1,2” means that Node 1 will be connected to Node 2. Node names can be just about anything, as long as they don’t contain the delimiter you specify. Nodes that are not connected to any others can be specified in the edgelist file by entering each node on a line by itself.
Network generators include the Erdos-Renyi algorithm (which generates Poisson random networks); the more generic configuration model, which an be used to generate random networks with Poisson, exponential, scale-free, or arbitrary degree distributions; the Watts-Strogatz small-world algorithm; and generators for square and ring lattices.
Visualizing large, randomly connected graphs is difficult, and graph visualization is not what EpiFire is designed to do. That said, it is possible to output a graph as a Graphviz input file. Graphviz is a highly customizable graph drawing program, but may not be useful for networks with thousands (or more) nodes.
Hladish TJ, Melamud E, Barrera LA, Galvani A, Meyers LA. EpiFire: An open source C++ library and application for contact network epidemiology. BMC Bioinformatics. 2012 May 4;13(1):76.