Template Class Partitioner

Inheritance Relationships

Base Type

Derived Types

Class Documentation

template<typename IDType>
class sparsebase::partition::Partitioner : public sparsebase::utils::FunctionMatcherMixin<IDType*>

An abstract class representing partitioning algorithms.

Class that generalizes partitioning algorithms. It defines the API used for partitioning as well as the return type of partitioning (IDType*).

tparam IDType

the data type of row and column numbers (vertex IDs in the case of graphs)

Subclassed by sparsebase::partition::MetisPartition< IDType, NNZType, ValueType >, sparsebase::partition::PatohPartition< IDType, NNZType, ValueType >, sparsebase::partition::PulpPartition< IDType, NNZType, ValueType >

Public Functions

Partitioner()
IDType *Partition(format::Format *format, std::vector<context::Context*> contexts, bool convert_input)

Performs a partition operation using the default parameters.

Parameters
  • format – the Format object that will be reordered.

  • contexts – vector of contexts that can be used for generating the partitioning.

  • convert_input – whether or not to convert the input format if that is needed.

Returns

An IDType array where the i-th index contains the ID for the partitioning i belongs to.

IDType *Partition(format::Format *format, utils::Parameters *params, std::vector<context::Context*> contexts, bool convert_input)

Performs a partition operation using the parameters supplied by the user.

Parameters
  • format – the Format object that will be reordered.

  • contexts – vector of contexts that can be used for generating the partitioning.

  • convert_input – whether or not to convert the input format if that is needed.

Returns

An IDType array where the i-th index contains the ID for the partitioning i belongs to

virtual ~Partitioner()