Template Struct table_collection¶
Defined in File table_collection.hpp
Struct Documentation¶
-
template<typename
NodeTableType, typenameEdgeTableType, typenameSiteTableType, typenameMutationTableType>
structfwdpp::ts::table_collection¶ A collection of tables for a single simulation.
- Version
0.7.0 Added to fwdpp
- Version
0.9.0 Made a template class
Public Types
-
using
node_table= NodeTableType¶
-
using
edge_table= EdgeTableType¶
-
using
site_table= SiteTableType¶
-
using
mutation_table= MutationTableType¶
-
using
edge_t= typename EdgeTableType::value_type¶
-
using
node_t= typename NodeTableType::value_type¶
-
using
site_t= typename SiteTableType::value_type¶
-
using
mutation_t= typename MutationTableType::value_type¶
Public Functions
-
table_collection(const double maxpos)¶
-
table_collection(const table_index_t num_initial_nodes, const double initial_time, table_index_t pop, const double maxpos)¶
-
void
clear() noexcept¶ Clears internal vectors.
-
void
record_preserved_nodes(const std::vector<table_index_t> &node_ids)¶ Take a list of nodes to record as “ancient samples”. Throws an exception if the nodes are already recorded as such.
-
table_index_t
push_back_node(double time, std::int32_t pop)¶
-
template<typename ...
args>
table_index_templace_back_node(args&&... Args)¶
-
std::size_t
push_back_edge(double l, double r, table_index_t parent, table_index_t child)¶
-
void
build_indexes()¶ Generates the index vectors referred to as I and O in Kelleher et al. (2016)
-
std::size_t
num_nodes() const¶
-
std::size_t
num_edges() const¶
-
double
genome_length() const¶
-
bool
operator==(const table_collection &b) const¶
-
bool
operator!=(const table_collection &b) const¶
Public Members
-
node_table
nodes¶ Node table for this simulation.
-
edge_table
edges¶ Edge table for this simulation.
-
mutation_table
mutations¶ Mutation table for this simulation;.
-
site_table
sites¶ Site table.
-
std::vector<table_index_t>
input_left¶ The input edge vector. “I” in Kelleher2016-cb, page 13.
-
std::vector<table_index_t>
output_right¶ The output edge vector. “O” in Kelleher2016-cb, page 13.
-
std::ptrdiff_t
edge_offset¶ This reflects the length of tables.edges after last simplification. It can be used to make sure we only sort newly-added nodes.
-
std::vector<table_index_t>
preserved_nodes¶ A vector of dead/ancient sample nodes.