Class GraphMetricSelector<U>
java.lang.Object
es.uam.eps.ir.relison.grid.sna.graph.GraphMetricSelector<U>
- Type Parameters:
U
- type of the users
public class GraphMetricSelector<U>
extends java.lang.Object
Class that translates from a grid to the different global metrics of the social network graph.
-
Constructor Summary
Constructors Constructor Description GraphMetricSelector()
-
Method Summary
Modifier and Type Method Description GraphMetricGridSearch<U>
getGridSearch(java.lang.String metric)
Obtains the grid configurator for a metric.java.util.Map<java.lang.String,GraphMetricFunction<U>>
getMetrics(java.lang.String name, Grid grid)
Obtains the different variants of a given global graph metric depending on the parameters selected in a grid.java.util.Map<java.lang.String,java.util.function.Supplier<GraphMetric<U>>>
getMetrics(java.lang.String name, Grid grid, DistanceCalculator<U> distcalc)
Obtains the different variants of a given global graph metric depending on the parameters selected in a grid.
-
Constructor Details
-
GraphMetricSelector
public GraphMetricSelector()
-
-
Method Details
-
getGridSearch
Obtains the grid configurator for a metric.- Parameters:
metric
- the name of the metric.- Returns:
- the grid configurator for the metric if it exists, null otherwise.
-
getMetrics
public java.util.Map<java.lang.String,java.util.function.Supplier<GraphMetric<U>>> getMetrics(java.lang.String name, Grid grid, DistanceCalculator<U> distcalc)Obtains the different variants of a given global graph metric depending on the parameters selected in a grid.- Parameters:
name
- the name of the metric.grid
- the grid containing the different parameters.distcalc
- a distance calculator.- Returns:
- a map containing the different metric suppliers.
-
getMetrics
public java.util.Map<java.lang.String,GraphMetricFunction<U>> getMetrics(java.lang.String name, Grid grid)Obtains the different variants of a given global graph metric depending on the parameters selected in a grid.- Parameters:
name
- the name of the metric.grid
- the grid containing the different parameters.- Returns:
- a map containing the different metric suppliers, which work given a distance calculator
-