Program Listing for File degrees_degree_distribution.h

Return to documentation for file (src/sparsebase/feature/degrees_degree_distribution.h)

#include <vector>

#include "sparsebase/config.h"
#include "sparsebase/feature/feature_preprocess_type.h"
#include "sparsebase/format/csr.h"
#include "sparsebase/utils/parameterizable.h"

#ifndef SPARSEBASE_PROJECT_DEGREES_DEGREE_DISTRIBUTION_H
#define SPARSEBASE_PROJECT_DEGREES_DEGREE_DISTRIBUTION_H
namespace sparsebase::feature {
struct Params : utils::Parameters {};
template <typename IDType, typename NNZType, typename ValueType,
          typename FeatureType>
class Degrees_DegreeDistribution
    : public feature::FeaturePreprocessType<
          std::unordered_map<std::type_index, std::any>> {
  typedef Params ParamsType;

 public:
  Degrees_DegreeDistribution();
  Degrees_DegreeDistribution(Params);
  Degrees_DegreeDistribution(
      const Degrees_DegreeDistribution<IDType, NNZType, ValueType, FeatureType>
          &d);
  Degrees_DegreeDistribution(std::shared_ptr<Params>);
  std::unordered_map<std::type_index, std::any> Extract(
      format::Format *format, std::vector<context::Context *>,
      bool convert_input) override;
  std::vector<std::type_index> get_sub_ids() override;
  std::vector<utils::Extractable *> get_subs() override;
  static std::type_index get_id_static();


  std::unordered_map<std::type_index, std::any> Get(
      format::Format *format, std::vector<context::Context *> contexts,
      bool convert_input);


  static std::unordered_map<std::type_index, std::any> GetCSR(
      std::vector<format::Format *> formats, utils::Parameters *params);
  ~Degrees_DegreeDistribution();

 protected:
  void Register();
};

}  // namespace sparsebase::feature
#ifdef _HEADER_ONLY
#include "sparsebase/feature/degrees_degree_distribution.cc"
#endif

#endif  // SPARSEBASE_PROJECT_DEGREES_DEGREE_DISTRIBUTION_H