Template Class Degrees_DegreeDistribution

Inheritance Relationships

Base Type

Class Documentation

template<typename IDType, typename NNZType, typename ValueType, typename FeatureType>
class sparsebase::feature::Degrees_DegreeDistribution : public sparsebase::feature::FeaturePreprocessType<std::unordered_map<std::type_index, std::any>>

Find the degree and degree distribution of each vertex in the graph representation of a format object

Public Functions

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
std::unordered_map<std::type_index, std::any> Get(format::Format *format, std::vector<context::Context*> contexts, bool convert_input)

Degree and degree distribution generation executor function that carries out function matching

Parameters
  • format – a single format pointer to any format

  • contexts – vector of contexts that can be used for extracting features.

  • convert_input – whether or not to convert the input format if that is needed.

Returns

a map with two (type_index, any) pairs. One is a degrees array of type IDType*, and one is a degree distribution array of type FeatureType*. Both arrays have the respective metric of the ith vertex in the ith array element.

~Degrees_DegreeDistribution()

Public Static Functions

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

Degree and degree distribution implementation function for CSRs.

Parameters
  • format – a single format pointer to any format

  • params – a utils::Parameters pointer, though it is not used in the function features.

Returns

a map with two (type_index, any) pairs. One is a degrees array of type IDType*, and one is a degree distribution array of type FeatureType*. Both arrays have the respective metric of the ith vertex in the ith array element.

Protected Functions

void Register()