Program Listing for File permute_order_two.h

Return to documentation for file (src/sparsebase/permute/permute_order_two.h)

#include <vector>

#include "sparsebase/config.h"
#include "sparsebase/format/array.h"
#include "sparsebase/permute/permuter.h"
#include "sparsebase/utils/parameterizable.h"
#ifndef SPARSEBASE_PROJECT_PERMUTE_ORDER_TWO_H
#define SPARSEBASE_PROJECT_PERMUTE_ORDER_TWO_H
namespace sparsebase::permute {

template <typename IDType>
struct PermuteOrderTwoParams : utils::Parameters {
  IDType *row_order;
  IDType *col_order;
  explicit PermuteOrderTwoParams(IDType *r_order, IDType *c_order)
      : row_order(r_order), col_order(c_order){};
};
template <typename IDType, typename NNZType, typename ValueType>
class PermuteOrderTwo
    : public Permuter<format::FormatOrderTwo<IDType, NNZType, ValueType>,
                      format::FormatOrderTwo<IDType, NNZType, ValueType>> {
 public:
  PermuteOrderTwo(IDType *, IDType *);
  explicit PermuteOrderTwo(PermuteOrderTwoParams<IDType>);
  typedef PermuteOrderTwoParams<IDType> ParamsType;

 protected:

  static format::FormatOrderTwo<IDType, NNZType, ValueType> *PermuteOrderTwoCSR(
      std::vector<format::Format *> formats, utils::Parameters *);
};

}  // namespace sparsebase::permute
#ifdef _HEADER_ONLY
#include "sparsebase/permute/permute_order_two.cc"
#endif

#endif  // SPARSEBASE_PROJECT_PERMUTE_ORDER_TWO_H