| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.mallet.types.SparseVector
cc.mallet.types.IndexedSparseVector
public class IndexedSparseVector
| Field Summary | 
|---|
| Fields inherited from class cc.mallet.types.SparseVector | 
|---|
| hasInfinite, indices, values | 
| Constructor Summary | |
|---|---|
| IndexedSparseVector()Create an empty vector | |
| IndexedSparseVector(int[] featureIndices)Create binary vector | |
| IndexedSparseVector(int[] featureIndices,
                    double[] values)Create non-binary vector, possibly dense if "featureIndices" or possibly sparse, if not | |
| IndexedSparseVector(int[] indices,
                    double[] values,
                    int capacity,
                    int size,
                    boolean copy,
                    boolean checkIndicesSorted,
                    boolean removeDuplicates) | |
| Method Summary | |
|---|---|
|  ConstantMatrix | cloneMatrix()CLONING | 
|  ConstantMatrix | cloneMatrixZeroed() | 
|  void | columnPlusEquals(int index,
                 double value) | 
|  double | dotProduct(DenseVector v) | 
|  double | dotProduct(SparseVector v) | 
|  void | indexVector() | 
|  int | location(int index) | 
|  void | plusEqualsSparse(SparseVector v)For each index i that is present in this vector, set this[i] += v[i]. | 
|  void | plusEqualsSparse(SparseVector v,
                 double factor)For each index i that is present in this vector, set this[i] += factor * v[i]. | 
|  void | setAll(double v)Sets every present index in the vector to v. | 
|  void | setValue(int index,
         double value)Sets the value at the given index. | 
|  void | setValueAtLocation(int location,
                   double value)Sets the value at the given location. | 
| Methods inherited from class cc.mallet.types.SparseVector | 
|---|
| absNorm, addTo, addTo, arrayCopyFrom, arrayCopyFrom, arrayCopyInto, dotProduct, dotProduct, extendedDotProduct, extendedDotProduct, getDimensions, getIndices, getNumDimensions, getValues, incrementValue, indexAtLocation, infinityNorm, isBinary, isInfinite, isNaN, isNaNOrInfinite, makeBinary, makeNonBinary, map, numLocations, oneNorm, print, removeDuplicates, singleIndex, singleSize, singleToIndices, singleValue, sortIndices, timesEquals, timesEqualsSparse, timesEqualsSparse, timesEqualsSparseZero, toString, toString, twoNorm, value, value, valueAtLocation, vectorAdd | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public IndexedSparseVector(int[] indices,
                           double[] values,
                           int capacity,
                           int size,
                           boolean copy,
                           boolean checkIndicesSorted,
                           boolean removeDuplicates)
public IndexedSparseVector()
public IndexedSparseVector(int[] featureIndices,
                           double[] values)
public IndexedSparseVector(int[] featureIndices)
| Method Detail | 
|---|
public ConstantMatrix cloneMatrix()
SparseVector
cloneMatrix in interface ConstantMatrixcloneMatrix in class SparseVectorpublic ConstantMatrix cloneMatrixZeroed()
cloneMatrixZeroed in class SparseVectorpublic void indexVector()
public final void setValue(int index,
                           double value)
SparseVector
setValue in class SparseVector
public final void setValueAtLocation(int location,
                                     double value)
SparseVector
setValueAtLocation in class SparseVector
public void columnPlusEquals(int index,
                             double value)
public final double dotProduct(DenseVector v)
dotProduct in class SparseVectorpublic final double dotProduct(SparseVector v)
dotProduct in class SparseVector
public final void plusEqualsSparse(SparseVector v,
                                   double factor)
SparseVector
plusEqualsSparse in class SparseVectorpublic final void plusEqualsSparse(SparseVector v)
SparseVector
plusEqualsSparse in class SparseVectorpublic final void setAll(double v)
SparseVector
setAll in class SparseVectorpublic int location(int index)
location in interface ConstantMatrixlocation in class SparseVector| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||