Program Listing for File degree_reorder.h
↰ Return to documentation for file (src/sparsebase/reorder/degree_reorder.h
)
#include <vector>
#include "sparsebase/config.h"
#include "sparsebase/format/csr.h"
#include "sparsebase/reorder/reorderer.h"
#include "sparsebase/utils/parameterizable.h"
#ifndef SPARSEBASE_PROJECT_DEGREE_REORDER_H
#define SPARSEBASE_PROJECT_DEGREE_REORDER_H
namespace sparsebase::reorder {
struct DegreeReorderParams : utils::Parameters {
bool ascending;
DegreeReorderParams(bool ascending) : ascending(ascending) {}
};
template <typename IDType, typename NNZType, typename ValueType>
class DegreeReorder : public Reorderer<IDType> {
public:
DegreeReorder(bool ascending);
typedef DegreeReorderParams ParamsType;
DegreeReorder(DegreeReorderParams);
protected:
static IDType *CalculateReorderCSR(std::vector<format::Format *> formats,
utils::Parameters *params);
};
} // namespace sparsebase::reorder
#ifdef _HEADER_ONLY
#include "sparsebase/reorder/degree_reorder.cc"
#endif
#endif // SPARSEBASE_PROJECT_DEGREE_REORDER_H