Skip to content

Commit

Permalink
Fixes part of MAHOUT-1155.
Browse files Browse the repository at this point in the history
https://issues.apache.org/jira/browse/MAHOUT-1155

Doesn't update Centroid because that is now part of the larger Vector changes
in https://issues.apache.org/jira/browse/MAHOUT-1202.



git-svn-id: https://svn.apache.org/repos/asf/mahout/trunk@1478836 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Dan Filimon committed May 3, 2013
1 parent eb1b627 commit b060663
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions math/src/main/java/org/apache/mahout/math/MatrixSlice.java
Expand Up @@ -17,17 +17,20 @@

package org.apache.mahout.math;

public class MatrixSlice {

private final Vector v;
private final int index;
public class MatrixSlice extends DelegatingVector {
private int index;

public MatrixSlice(Vector v, int index) {
this.v = v;
super(v);
this.index = index;
}

public Vector vector() { return v; }
public int index() { return index; }
public Vector vector() {
return getVector();
}

public int index() {
return index;
}
}

0 comments on commit b060663

Please sign in to comment.