All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MatrixReader.h
Go to the documentation of this file.
1 /*
2  * GraphReader.h
3  *
4  * Created on: 17.01.2013
5  * Author: Christian Staudt (christian.staudt@kit.edu)
6  */
7 
8 #ifndef MATRIXREADER_H_
9 #define MATRIXREADER_H_
10 
11 #include "../algebraic/CSRMatrix.h"
12 
13 namespace NetworKit {
14 
19 class MatrixReader {
20 public:
21  virtual ~MatrixReader() = default;
22 
26  virtual CSRMatrix read(const std::string& path) = 0;
27 
29  CSRMatrix* _read(const std::string& path) {
30  return new CSRMatrix{read(path)};
31  };
32 };
33 
34 }
35 #endif
Abstract base class for matrix readers.
Definition: MatrixReader.h:19
CSRMatrix * _read(const std::string &path)
only to be used by cython - this eliminates an unnecessary copy
Definition: MatrixReader.h:29
The CSRMatrix class represents a sparse matrix stored in CSR-Format (i.e.
Definition: CSRMatrix.h:26
virtual ~MatrixReader()=default
virtual CSRMatrix read(const std::string &path)=0
Reads the matrix in path.