Program Listing for File degree_distribution.h
↰ Return to documentation for file (src/sparsebase/feature/degree_distribution.h
)
#include <vector>
#include "sparsebase/config.h"
#include "sparsebase/feature/feature_preprocess_type.h"
#include "sparsebase/format/csr.h"
#include "sparsebase/object/object.h"
#include "sparsebase/utils/parameterizable.h"
#ifndef SPARSEBASE_PROJECT_DEGREE_DISTRIBUTION_H
#define SPARSEBASE_PROJECT_DEGREE_DISTRIBUTION_H
namespace sparsebase::feature {
struct DegreeDistributionParams : utils::Parameters {};
template <typename IDType, typename NNZType, typename ValueType,
typename FeatureType>
class DegreeDistribution
: public feature::FeaturePreprocessType<FeatureType *> {
public:
typedef DegreeDistributionParams ParamsType;
DegreeDistribution();
DegreeDistribution(DegreeDistributionParams);
DegreeDistribution(const DegreeDistribution &);
DegreeDistribution(std::shared_ptr<DegreeDistributionParams>);
virtual std::unordered_map<std::type_index, std::any> Extract(
format::Format *format, std::vector<context::Context *>,
bool convert_input);
virtual std::vector<std::type_index> get_sub_ids();
virtual std::vector<utils::Extractable *> get_subs();
static std::type_index get_id_static();
FeatureType *GetDistribution(format::Format *format,
std::vector<context::Context *> contexts,
bool convert_input);
FeatureType *GetDistribution(
object::Graph<IDType, NNZType, ValueType> *object,
std::vector<context::Context *> contexts, bool convert_input);
std::tuple<std::vector<std::vector<format::Format *>>, FeatureType *>
GetDistributionCached(format::Format *format,
std::vector<context::Context *> contexts,
bool convert_input);
static FeatureType
*
GetDegreeDistributionCSR(std::vector<format::Format *> formats,
utils::Parameters *params);
~DegreeDistribution();
protected:
void Register();
};
} // namespace sparsebase::feature
#ifdef _HEADER_ONLY
#include "sparsebase/feature/degree_distribution.cc"
#endif
#endif // SPARSEBASE_PROJECT_DEGREE_DISTRIBUTION_H