bpp-seq3  3.0.0
PhylipDistanceMatrixFormat.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_PHYLIPDISTANCEMATRIXFORMAT_H
6 #define BPP_PHYL_IO_PHYLIPDISTANCEMATRIXFORMAT_H
7 
8 
9 #include "IoDistanceMatrix.h"
10 
11 namespace bpp
12 {
23 {
24 private:
25  bool extended_;
26 
27 public:
28  PhylipDistanceMatrixFormat(bool extended = false) : extended_(extended) {}
30 
31 public:
32  const std::string getFormatName() const { return "Phylip"; }
33 
34  const std::string getFormatDescription() const { return "Multiline space-delimited columns."; }
35 
36  std::unique_ptr<DistanceMatrix> readDistanceMatrix(const std::string& path) const
37  {
39  }
40 
41  std::unique_ptr<DistanceMatrix> readDistanceMatrix(std::istream& in) const;
42 
43  void writeDistanceMatrix(const DistanceMatrix& dist, const std::string& path, bool overwrite = true) const
44  {
45  AbstractODistanceMatrix::writeDistanceMatrix(dist, path, overwrite);
46  }
47 
48  void writeDistanceMatrix(const DistanceMatrix& dist, std::ostream& out) const;
49 };
50 } // end of namespace bpp.
51 #endif // BPP_PHYL_IO_PHYLIPDISTANCEMATRIXFORMAT_H
Partial implementation of the IDistanceMatrix interface.
virtual std::unique_ptr< DistanceMatrix > readDistanceMatrix(const std::string &path) const
Read a distance matrix from a file.
Partial implementation of the ODistanceMatrix interface.
virtual void writeDistanceMatrix(const DistanceMatrix &dist, const std::string &path, bool overwrite) const
Write a distance matrix to a file.
A Matrix class to store phylogenetic distances.
Distance matrix I/O in Phylip format.
void writeDistanceMatrix(const DistanceMatrix &dist, const std::string &path, bool overwrite=true) const
Write a distance matrix to a file.
const std::string getFormatDescription() const
std::unique_ptr< DistanceMatrix > readDistanceMatrix(const std::string &path) const
Read a distance matrix from a file.
This alphabet is used to deal NumericAlphabet.