Example usage for org.apache.commons.math3.linear ArrayRealVector getL1Distance

List of usage examples for org.apache.commons.math3.linear ArrayRealVector getL1Distance

Introduction

In this page you can find the example usage for org.apache.commons.math3.linear ArrayRealVector getL1Distance.

Prototype

@Override
public double getL1Distance(RealVector v) throws DimensionMismatchException 

Source Link

Usage

From source file:jurls.core.approximation.WeightedInterpolationFunction.java

private double weight(ArrayRealVector a, ArrayRealVector b) {
    double d = a.getL1Distance(b);
    return Math.pow(1 / (1 + d), power);
}