Template Class JaccardWeights
Defined in File jaccard_weights.h
Inheritance Relationships
Base Type
public sparsebase::utils::FunctionMatcherMixin< format::Format * >
(Template Class FunctionMatcherMixin)
Class Documentation
-
template<typename IDType, typename NNZType, typename ValueType, typename FeatureType>
class sparsebase::feature::JaccardWeights : public sparsebase::utils::FunctionMatcherMixin<format::Format*> Calculate the Jaccard Weights of the edges in a graph representation of a format object
Public Types
-
typedef JaccardWeightsParams ParamsType
An empty struct used for the parameters of JaccardWeights.
Public Functions
-
JaccardWeights()
-
JaccardWeights(ParamsType)
-
format::Format *GetJaccardWeights(format::Format *format, std::vector<context::Context*>, bool convert_input)
Take a single Format object representating a graph and get the Jaccard Weights as a 1D format object
- Parameters
format – input format object representing a graph
convert_input – whether or not to convert the input format if that is needed.
- Returns
a 1D format (array) where element i in the array is the Jaccard Weight of edge i in the graph (ith non-zero)
-
~JaccardWeights()
Public Static Functions
-
static format::Format *GetJaccardWeightCUDACSR(std::vector<format::Format*> formats, utils::Parameters *params)
Take a CUDACSR representating a graph and get the Jaccard Weights as a CUDAArray
- Parameters
formats – a vector of size 1 with formats[0] being CUDACSR representing a graph
params – a polymorphic pointer at a Parameters (not used)
- Returns
a 1D array (CUDAArray) where element i in the array is the Jaccard Weight of edge i in the graph (ith non-zero)
-
typedef JaccardWeightsParams ParamsType