added javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@768591 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
97bbb9cf25
commit
881e5114bf
|
@ -467,6 +467,14 @@ public class SparseRealVector implements RealVector {
|
|||
return entries.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Distance between two vectors.
|
||||
* <p>This method computes the distance consistent with
|
||||
* L<sub>1</sub> norm, i.e. the sum of the absolute values of
|
||||
* elements differences.</p>
|
||||
* @param v vector to which distance is requested
|
||||
* @return distance between two vectors.
|
||||
*/
|
||||
public double getL1Distance(SparseRealVector v) {
|
||||
double max = 0;
|
||||
Iterator iter = entries.iterator();
|
||||
|
|
Loading…
Reference in New Issue