Graph measures¶
Using SparklingGraph you can utilize multiple well-known measures for graphs.
Graph measures API¶
Graph measures¶
Each graph mesure extends GraphMeasure trait, defining what kind of value will be returned for whole graph.
Vertex measures¶
Each vertex mesure extends VertexMeasure trait, defining what kind of value will be returned for each vertex. For main part of measures that will be a single number (like Double) but for some of them a tupple (or other data type) can be returned (like (Double,Double)). Each measure defines also implicit methods for graph, thanks to what your code will be more readable, and you will develop your experiments faster.
Measures accepts VertexMeasureConfiguration in order to configure computation process. You can set following parameters:
- BucketSizeProvider - used in more complex computations in order to divide data into buckets
treatAsUndirected:Boolean
- graph will be treated as undirected during computations
Edges measures¶
Each edge mesure extends EdgeMeasure trait, defining what kind of value will be returned for each edge, and what kind of data is expected for each vertex. Each measure defines also implicit methods for graph, thanks to what your code will be more readable, and you will develop your experiments faster.
Measures accepts parameters:
treatAsUndirected:Boolean
- graph will be treated as undirected during computations
Beside defining methods for computing measure for whole graph, method (computeValues) for single edge is also present.
Measures¶
Curretnly you can use following measures:
Vertex measures:
Graph measures:
Edges measures: