bpp-phyl3 3.0.0
IoSubstitutionModel.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: The Bio++ Development Group
2//
3// SPDX-License-Identifier: CECILL-2.1
4
5#ifndef BPP_PHYL_IO_IOSUBSTITUTIONMODEL_H
6#define BPP_PHYL_IO_IOSUBSTITUTIONMODEL_H
7
8
9#include "../Model/SubstitutionModel.h"
10
11// From bpp-core:
12#include <Bpp/Exceptions.h>
13#include <Bpp/Io/IoFormat.h>
14#include <Bpp/Io/OutputStream.h>
15
16// From bpp-seq:
18
19namespace bpp
20{
21class TransitionModelInterface;
22class SubstitutionModelInterface;
23
28 public virtual IOFormat
29{
30public:
33
34public:
35 virtual const std::string getDataType() const { return "Substitution Model"; }
36};
37
43 public virtual IoSubstitutionModel
44{
45public:
48
49public:
61 virtual std::unique_ptr<SubstitutionModelInterface> readSubstitutionModel(
62 std::shared_ptr<const Alphabet> alphabet,
63 const std::string& modelDescription,
64 const std::map<size_t, std::shared_ptr<const AlignmentDataInterface>>& mData,
65 size_t nData,
66 bool parseArguments = true) = 0;
67
71 virtual const std::map<std::string, std::string>& getUnparsedArguments() const = 0;
72};
73
78 public virtual IoSubstitutionModel
79{
80public:
83
84public:
95 virtual void write(
96 const BranchModelInterface& model,
97 OutputStream& out,
98 std::map<std::string, std::string>& globalAliases,
99 std::vector<std::string>& writtenNames) const = 0;
100};
101} // end of namespace bpp.
102#endif // BPP_PHYL_IO_IOSUBSTITUTIONMODEL_H
Interface for all Branch models.
General interface for model readers.
virtual std::unique_ptr< SubstitutionModelInterface > readSubstitutionModel(std::shared_ptr< const Alphabet > alphabet, const std::string &modelDescription, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface > > &mData, size_t nData, bool parseArguments=true)=0
Read a substitution model from a string.
virtual const std::map< std::string, std::string > & getUnparsedArguments() const =0
General interface for model I/O.
virtual const std::string getDataType() const
General interface for distance matrix writers.
virtual void write(const BranchModelInterface &model, OutputStream &out, std::map< std::string, std::string > &globalAliases, std::vector< std::string > &writtenNames) const =0
Write a substitution model to a stream.
Defines the basic types of data flow nodes.