.. _program_listing_file_src_sparsebase_feature_degree_distribution.h: Program Listing for File degree_distribution.h ============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/sparsebase/feature/degree_distribution.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include #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 class DegreeDistribution : public feature::FeaturePreprocessType { public: typedef DegreeDistributionParams ParamsType; DegreeDistribution(); DegreeDistribution(DegreeDistributionParams); DegreeDistribution(const DegreeDistribution &); DegreeDistribution(std::shared_ptr); virtual std::unordered_map Extract( format::Format *format, std::vector, bool convert_input); virtual std::vector get_sub_ids(); virtual std::vector get_subs(); static std::type_index get_id_static(); FeatureType *GetDistribution(format::Format *format, std::vector contexts, bool convert_input); FeatureType *GetDistribution( object::Graph *object, std::vector contexts, bool convert_input); std::tuple>, FeatureType *> GetDistributionCached(format::Format *format, std::vector contexts, bool convert_input); static FeatureType * GetDegreeDistributionCSR(std::vector 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