Uniform

Defined in algorithms/uniform.hpp

namespace sarma::uniform

Functions

template<class Ordinal>
std::vector<Ordinal> partition(const Ordinal N, const Ordinal P)

Implements the uniform (checker-board) partitioning taking number of rows and number of cuts as parameters.

Return

a cut vector

Parameters
  • N: number of rows

  • P: number of parts

Template Parameters
  • Ordinal: data-type of indptr and indices structures in sarma::Matrix

template<class Ordinal, class Value>
auto bal(const Matrix<Ordinal, Value> &A, const Value Z)

Implements Bound a Load (BaL) algorithm using UNI as the mLI algorithm.

Return

a cut vector

Parameters
Template Parameters

template<class Ordinal, class Value>
std::vector<Ordinal> partition(const Matrix<Ordinal, Value> &A, const Ordinal P, const Value Z = 0)

Implements the Uniform (Uni) checker-board partitioning It basically returns equally spaced cuts. Note that if Z is greater than zero then this function overrides P and calls the dual of the uniform partitioning that solves MNc problem.

Return

a cut vector

Parameters
  • A: Matrix

  • P: number of parts

  • Z: Target load

Template Parameters
  • Ordinal: data-type of indptr and indices structures in sarma::Matrix