Program Listing for File reader.h
↰ Return to documentation for file (src/sparsebase/io/reader.h
)
/*******************************************************
* Copyright (c) 2022 SparCity, Amro Alabsi Aljundi, Taha Atahan Akyildiz, Arda
*Sener All rights reserved.
*
* This file is distributed under MIT license.
* The complete license agreement can be obtained at:
* https://sparcityeu.github.io/sparsebase/pages/license.html
********************************************************/
#ifndef SPARSEBASE_SPARSEBASE_UTILS_IO_READER_H_
#define SPARSEBASE_SPARSEBASE_UTILS_IO_READER_H_
#include <algorithm>
#include <cstring>
#include <fstream>
#include <string>
#include <utility>
#include <vector>
#include "sparsebase/config.h"
#include "sparsebase/format/array.h"
#include "sparsebase/format/coo.h"
#include "sparsebase/format/csc.h"
#include "sparsebase/format/csr.h"
#include "sparsebase/format/format_order_one.h"
#include "sparsebase/format/format_order_two.h"
namespace sparsebase {
namespace io {
class Reader {
public:
virtual ~Reader() = default;
};
template <typename IDType, typename NNZType, typename ValueType>
class ReadsCSR {
public:
virtual format::CSR<IDType, NNZType, ValueType> *ReadCSR() const = 0;
};
template <typename IDType, typename NNZType, typename ValueType>
class ReadsCOO {
public:
virtual format::COO<IDType, NNZType, ValueType> *ReadCOO() const = 0;
};
template <typename T>
class ReadsArray {
public:
virtual format::Array<T> *ReadArray() const = 0;
};
} // namespace io
} // namespace sparsebase
#endif // SPARSEBASE_SPARSEBASE_UTILS_IO_READER_H_