public class Analytics extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
connectedComponent |
static String |
degree |
| Constructor and Description |
|---|
Analytics(String keySpace,
Set<String> subTypeIds,
Set<String> statisticsResourceTypeIds)
Create a graph computer from a Grakn Graph.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Set<String>> |
connectedComponents()
Compute the number of connected components.
|
Map<String,Long> |
connectedComponentsAndPersist()
Compute the connected components and persist the component labels
|
Map<String,Long> |
connectedComponentsSize()
Compute the number of connected components.
|
long |
count()
Count the number of instances in the graph.
|
Map<Long,Set<String>> |
degrees()
Compute the number of relations that each instance takes part in.
|
void |
degreesAndPersist()
Compute the number of relations that each instance takes part in and persist this information in the graph.
|
protected GraknComputer |
getGraphComputer() |
Optional<Number> |
max()
Maximum value of the selected resource-type.
|
Optional<Double> |
mean()
Compute the mean of instances of the selected resource-type.
|
Optional<Number> |
median()
Compute the median of instances of the selected resource-type.
|
Optional<Number> |
min()
Minimum value of the selected resource-type.
|
Optional<Double> |
std()
Compute the standard deviation of instances of the selected resource-type.
|
Optional<Number> |
sum()
Sum of values of the selected resource-type.
|
public static final String degree
public static final String connectedComponent
public Analytics(String keySpace, Set<String> subTypeIds, Set<String> statisticsResourceTypeIds)
subtypes argument. All subtypes of the given types are included when deciding whether to
include an instance.subTypeIds - the set of type ids the computer will use to filter instancesstatisticsResourceTypeIds - the set of resource type ids statistics will be working onpublic long count()
public Optional<Double> mean()
public Optional<Number> median()
public Optional<Double> std()
public Map<String,Set<String>> connectedComponents()
public Map<String,Long> connectedComponentsSize()
public Map<String,Long> connectedComponentsAndPersist()
public Map<Long,Set<String>> degrees()
public void degreesAndPersist()
protected GraknComputer getGraphComputer()
Copyright © 2016 Grakn Labs Ltd. All rights reserved.