Program Listing for File degrees.h
↰ Return to documentation for file (src/sparsebase/feature/degrees.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_H
#define SPARSEBASE_PROJECT_DEGREES_H
namespace sparsebase::feature {
template <typename IDType, typename NNZType, typename ValueType>
class Degrees : public feature::FeaturePreprocessType<IDType *> {
public:
typedef utils::Parameters ParamsType;
Degrees();
Degrees(ParamsType);
Degrees(const Degrees<IDType, NNZType, ValueType> &d);
Degrees(std::shared_ptr<ParamsType>);
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();
IDType *GetDegrees(format::Format *format,
std::vector<context::Context *> contexts,
bool convert_input);
std::
tuple<std::vector<std::vector<format::Format *>>, IDType *>
GetDegreesCached(format::Format *format,
std::vector<context::Context *> contexts,
bool convert_input);
static IDType *GetDegreesCSR(std::vector<format::Format *> formats,
utils::Parameters *params);
~Degrees();
protected:
void Register();
};
} // namespace sparsebase::feature
#ifdef _HEADER_ONLY
#include "sparsebase/feature/degrees.cc"
#endif
#endif // SPARSEBASE_PROJECT_DEGREES_H