List of usage examples for org.apache.commons.math3.linear RealVector getL1Distance
public double getL1Distance(RealVector v) throws DimensionMismatchException
From source file:game.utils.Utils.java
public static double getDistance(String type, RealVector v1, RealVector v2) { switch (type.toLowerCase()) { case "l1": return v1.getL1Distance(v2); case "l2": return v1.getDistance(v2); case "linf": return v1.getLInfDistance(v2); }/* w w w . java 2 s. c om*/ return -1; }