Template Class DegreeReorder

Inheritance Relationships

Base Type

Class Documentation

template<typename IDType, typename NNZType, typename ValueType>
class sparsebase::reorder::DegreeReorder : public sparsebase::reorder::Reorderer<IDType>

Reordering preprocessing algorithm that reorders a format by representing it as an adjacency matrix of a graph and ordering its vertices by degree

Public Types

typedef DegreeReorderParams ParamsType

The hyperparameters used by the implementation functions of DegreeReorder.

Public Functions

DegreeReorder(bool ascending)
DegreeReorder(DegreeReorderParams)

Protected Static Functions

static IDType *CalculateReorderCSR(std::vector<format::Format*> formats, utils::Parameters *params)

An implementation function that will reorder a CSR format.

Parameters
  • formats – a vector containing a single Format object of type CSR

  • params – a polymorphic pointer at a DegreeReorderParams object

Returns

an inverse permutation of the input format; an array of size format.get_dimensions()[0] where the ith element is the order of the ith element in the original format object