5 #ifndef BPP_PHYL_IO_IODISTANCEMATRIX_H
6 #define BPP_PHYL_IO_IODISTANCEMATRIX_H
28 virtual const std::string
getDataType()
const {
return "Distance matrix"; }
104 std::ifstream input(path.c_str(), std::ios::in);
126 std::ofstream output(path.c_str(), overwrite ? (std::ios::out) : (std::ios::out | std::ios::app));
Partial implementation of the IDistanceMatrix interface.
virtual ~AbstractIDistanceMatrix()
virtual std::unique_ptr< DistanceMatrix > readDistanceMatrix(const std::string &path) const
Read a distance matrix from a file.
AbstractIDistanceMatrix()
virtual std::unique_ptr< DistanceMatrix > readDistanceMatrix(std::istream &in) const =0
Read a distance matrix from a stream.
Partial implementation of the ODistanceMatrix interface.
virtual ~AbstractODistanceMatrix()
AbstractODistanceMatrix()
virtual void writeDistanceMatrix(const DistanceMatrix &dist, std::ostream &out) const =0
Write a distance matrix to a stream.
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.
General interface for distance matrix readers.
virtual std::unique_ptr< DistanceMatrix > readDistanceMatrix(const std::string &path) const =0
Read a distance matrix from a file.
virtual std::unique_ptr< DistanceMatrix > readDistanceMatrix(std::istream &in) const =0
Read a distance matrix from a stream.
virtual ~IDistanceMatrix()
General interface for distance matrix I/O.
virtual ~IODistanceMatrix()
virtual const std::string getDataType() const
General interface for distance matrix writers.
virtual void writeDistanceMatrix(const DistanceMatrix &dist, const std::string &path, bool overwrite) const =0
Write a distance matrix to a file.
virtual void writeDistanceMatrix(const DistanceMatrix &dist, std::ostream &out) const =0
Write a distance matrix to a stream.
virtual ~ODistanceMatrix()
This alphabet is used to deal NumericAlphabet.