Class GraphFeatureBase

Class Documentation

class sparsebase::bases::GraphFeatureBase

Public Static Functions

template<typename FeatureType, typename AutoIDType, typename AutoNNZType, typename AutoValueType>
static inline FeatureType *GetDegreeDistribution(format::FormatOrderTwo<AutoIDType, AutoNNZType, AutoValueType> *format, std::vector<context::Context*> contexts, bool convert_input)

Calculates the degree distribution of every vertex represented by the FormerOrderTwo object format.

Template Parameters

FeatureType – data type used for storing degree distribution values.

Parameters
  • format – FormatOrderTwo object representing a graph.

  • contexts – vector of contexts that can be used for permutation.

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

Returns

an array of type FeatureType* size format->get_dimensions()[0] with the degree distribution of each vertex.

template<typename FeatureType, typename AutoIDType, typename AutoNNZType, typename AutoValueType>
static inline std::pair<std::vector<format::FormatOrderTwo<AutoIDType, AutoNNZType, AutoValueType>*>, FeatureType*> GetDegreeDistributionCached(format::FormatOrderTwo<AutoIDType, AutoNNZType, AutoValueType> *format, std::vector<context::Context*> contexts)

Calculates the degree distribution of every vertex represented by the FormerOrderTwo object format with cached output.

Template Parameters

FeatureType – data type used for storing degree distribution values.

Parameters
  • format – FormatOrderTwo object representing a graph.

  • contexts – vector of contexts that can be used for permutation.

Returns

An std::pair with the second element being an array of type FeatureType* size format->get_dimensions()[0] with the degree distribution of each vertex, and the first being a vector of all the formats generated by converting the input (if such conversions were needed to execute the permutation).

template<typename AutoIDType, typename AutoNNZType, typename AutoValueType>
static inline AutoNNZType *GetDegrees(format::FormatOrderTwo<AutoIDType, AutoNNZType, AutoValueType> *format, std::vector<context::Context*> contexts, bool convert_input)

Calculates the degree count of every vertex represented by the FormerOrderTwo object format.

Parameters
  • format – FormatOrderTwo object representing a graph.

  • contexts – vector of contexts that can be used for permutation.

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

Returns

an array of size format->get_dimensions()[0] with the degree of each vertex.

template<typename AutoIDType, typename AutoNNZType, typename AutoValueType>
static inline std::pair<std::vector<format::FormatOrderTwo<AutoIDType, AutoNNZType, AutoValueType>*>, AutoNNZType*> GetDegreesCached(format::FormatOrderTwo<AutoIDType, AutoNNZType, AutoValueType> *format, std::vector<context::Context*> contexts)

Calculates the degree count of every vertex represented by the FormerOrderTwo object format with cached output.

Parameters
  • format – FormatOrderTwo object representing a graph.

  • contexts – vector of contexts that can be used for permutation.

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

Returns

An std::pair with the second element being an array of type FeatureType* size format->get_dimensions()[0] with the degree of each vertex, and the first being a vector of all the formats generated by converting the input (if such conversions were needed to execute the permutation).