Skip to content

Commit

Permalink
Add types/tree_sequence.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Jul 6, 2021
1 parent 56aa5e8 commit c4fba95
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fwdpp/ts/types/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pkginclude_HEADERS= node.hpp \
site.hpp \
mutation_record.hpp \
generate_null_id.hpp \
table_collection.hpp
table_collection.hpp \
tree_sequence.hpp
30 changes: 30 additions & 0 deletions fwdpp/ts/types/tree_sequence.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once

#include <cstdint>
#include <memory>
#include <vector>
#include "table_collection.hpp"

namespace fwdpp
{
namespace ts
{
namespace types
{
template <typename SignedInteger> class tree_sequence
{
private:
std::shared_ptr<const types::table_collection<SignedInteger>> tables_;
std::vector<SignedInteger> samples_;
std::size_t num_trees_;

public:
tree_sequence(
std::shared_ptr<types::table_collection<SignedInteger>> tables)
: tables_{std::move(tables)}
{
}
};
}
}
}

0 comments on commit c4fba95

Please sign in to comment.