Example usage for org.apache.solr.common.util Pair first

List of usage examples for org.apache.solr.common.util Pair first

Introduction

In this page you can find the example usage for org.apache.solr.common.util Pair first.

Prototype

T1 first

To view the source code for org.apache.solr.common.util Pair first.

Click Source Link

Usage

From source file:de.qaware.chronix.solr.query.analysis.functions.analyses.FastDtw.java

License:Apache License

@Override
public void execute(Pair<MetricTimeSeries, MetricTimeSeries> timeSeriesPair,
        FunctionValueMap functionValueMap) {
    //We have to build a multivariate time series
    MultivariateTimeSeries origin = buildMultiVariateTimeSeries(timeSeriesPair.first());
    MultivariateTimeSeries other = buildMultiVariateTimeSeries(timeSeriesPair.second());
    //Call the fast dtw library
    TimeWarpInfo result = FastDTW.getWarpInfoBetween(origin, other, searchRadius, distanceFunction);
    //Check the result. If it lower equals the threshold, we can return the other time series
    functionValueMap.add(this, result.getNormalizedDistance() <= maxNormalizedWarpingCost,
            timeSeriesPair.second().getMetric());

}

From source file:de.qaware.chronix.solr.type.metric.functions.analyses.FastDtw.java

License:Apache License

@Override
public void execute(Pair<MetricTimeSeries, MetricTimeSeries> timeSeriesPair,
        FunctionValueMap functionValueMap) {
    //We have to build a multivariate time series
    MultivariateTimeSeries origin = buildMultiVariateTimeSeries(timeSeriesPair.first());
    MultivariateTimeSeries other = buildMultiVariateTimeSeries(timeSeriesPair.second());
    //Call the fast dtw library
    TimeWarpInfo result = FastDTW.getWarpInfoBetween(origin, other, searchRadius, distanceFunction);
    //Check the result. If it lower equals the threshold, we can return the other time series
    functionValueMap.add(this, result.getNormalizedDistance() <= maxNormalizedWarpingCost,
            timeSeriesPair.second().getName());

}