public class FloatSparseMatrix extends Object
| Constructor and Description | 
|---|
| FloatSparseMatrix(int numRows)Create a new matrix with the given number of rows. | 
| Modifier and Type | Method and Description | 
|---|---|
| float | get(int i,
   int j)Get a specific entry of the matrix. | 
| int | getNumRows()Get the number of rows in the matrix. | 
| FloatSparseVector | getRow(int i)Get a specific row of the matrix. | 
| void | initialize()Create a empty matrix with all values set to 0.0 | 
| void | set(int i,
   int j,
   float v)Set a specific entry of the matrix. | 
| void | setRow(int i,
      FloatSparseVector vec)Set the float vector as the row specified. | 
public FloatSparseMatrix(int numRows)
numRows - the number of rows.public void initialize()
public int getNumRows()
public float get(int i,
                 int j)
i - the rowj - the columnpublic void set(int i,
                int j,
                float v)
i - the rowj - the columnv - the value of the entrypublic FloatSparseVector getRow(int i)
i - the row numberpublic void setRow(int i,
                   FloatSparseVector vec)
i - the rowvec - the vector to set as the rowCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.