Program Listing for File writer.h
↰ Return to documentation for file (src/sparsebase/io/writer.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_WRITER_H_
#define SPARSEBASE_SPARSEBASE_UTILS_IO_WRITER_H_
#include <string>
#include "sparsebase/format/array.h"
#include "sparsebase/format/coo.h"
#include "sparsebase/format/csc.h"
#include "sparsebase/format/csr.h"
#include "sparsebase/format/format.h"
#include "sparsebase/format/format_order_one.h"
#include "sparsebase/format/format_order_two.h"
namespace sparsebase {
namespace io {
class Writer {
public:
virtual ~Writer() = default;
};
template <typename IDType, typename NNZType, typename ValueType>
class WritesCSR {
virtual void WriteCSR(format::CSR<IDType, NNZType, ValueType> *csr) const = 0;
};
template <typename IDType, typename NNZType, typename ValueType>
class WritesCOO {
virtual void WriteCOO(format::COO<IDType, NNZType, ValueType> *coo) const = 0;
};
template <typename T>
class WritesArray {
virtual void WriteArray(format::Array<T> *arr) const = 0;
};
} // namespace io
} // namespace sparsebase
#endif // SPARSEBASE_SPARSEBASE_UTILS_IO_WRITER_H_