Program Listing for File pigo_edge_list_reader.h

Return to documentation for file (src/sparsebase/io/pigo_edge_list_reader.h)

#include <fstream>
#include <string>

#include "sparsebase/config.h"
#include "sparsebase/io/reader.h"
#ifndef SPARSEBASE_PROJECT_PIGO_EDGE_LIST_READER_H
#define SPARSEBASE_PROJECT_PIGO_EDGE_LIST_READER_H
namespace sparsebase::io {
template <typename IDType, typename NNZType, typename ValueType>
class PigoEdgeListReader : public Reader,
                           public ReadsCSR<IDType, NNZType, ValueType>,
                           public ReadsCOO<IDType, NNZType, ValueType> {
 public:
  PigoEdgeListReader(std::string filename, bool weighted);
  format::CSR<IDType, NNZType, ValueType> *ReadCSR() const override;
  format::COO<IDType, NNZType, ValueType> *ReadCOO() const override;
  virtual ~PigoEdgeListReader() = default;

 private:
  std::string filename_;
  bool weighted_;
};
}  // namespace sparsebase::io
#ifdef _HEADER_ONLY
#include "pigo_edge_list_reader.cc"
#endif
#endif  // SPARSEBASE_PROJECT_PIGO_EDGE_LIST_READER_H