Empirical
Namespaces | Functions
graph_utils.h File Reference

This file provides a number of tools for manipulating graphs. More...

#include <fstream>
#include <iostream>
#include <string>
#include <tuple>
#include "../base/assert.h"
#include "../base/vector.h"
#include "Graph.h"
#include "Random.h"
#include "random_utils.h"

Go to the source code of this file.

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Functions

Graph emp::shuffle_graph (const Graph &in_graph, Random &random)
 
Graph emp::build_graph_ring (size_t v_count, Random &random)
 Construct a graph where all vertics are degree two and form a single ring. More...
 
Graph emp::build_graph_tree (size_t v_count, Random &random)
 
Graph emp::build_graph_random (size_t v_count, size_t e_count, Random &random, bool connected=true)
 
Graph emp::build_graph_grid (size_t width, size_t height, Random &random, double prob_use=1.0)
 Construct a graph with width x height vertices setup into a grid structure. More...
 
Graph emp::build_graph_clique_set (size_t clique_size, size_t clique_count, Random &random, double extra_prob=0.5)
 
Graph emp::build_graph_dag (size_t v_count, size_t e_count, Random &random, bool connected=true)
 
WeightedGraph emp::build_weighted_graph_tree (size_t v_count, size_t min_weight, size_t max_weight, Random &random)
 
WeightedGraph emp::build_weighted_graph_random (size_t v_count, size_t e_count, size_t min_weight, size_t max_weight, Random &random, bool connected=true)
 
Graph emp::load_graph_sym (std::istream &is, bool sub1=false)
 
Graph emp::load_graph_sym (std::string filename, bool sub1=false)
 Load a graph with a specified filename. More...
 
Graph emp::load_graph_table (std::istream &is)
 
Graph emp::load_graph_table (std::string filename)
 Load a graph from a connection matrix in a file by the specified name. More...
 

Detailed Description

This file provides a number of tools for manipulating graphs.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2017
Note
Status: BETA