public static class Neurons.SparseVector extends water.Iced implements Neurons.Vector
Modifier and Type | Class and Description |
---|---|
class |
Neurons.SparseVector.Iterator
Iterator over a sparse vector
|
Modifier and Type | Method and Description |
---|---|
void |
add(int i,
float val) |
Neurons.SparseVector.Iterator |
begin() |
Neurons.SparseVector.Iterator |
end() |
float |
get(int i)
Slow path access to i-th element
|
int |
nnz() |
float[] |
raw() |
void |
set(int i,
float val) |
int |
size() |
water.fvec.Frame |
toFrame(water.Key key) |
public int size()
size
in interface Neurons.Vector
public int nnz()
public float get(int i)
get
in interface Neurons.Vector
i
- element indexpublic void set(int i, float val)
set
in interface Neurons.Vector
public void add(int i, float val)
add
in interface Neurons.Vector
public float[] raw()
raw
in interface Neurons.Vector
public Neurons.SparseVector.Iterator begin()
public Neurons.SparseVector.Iterator end()
public water.fvec.Frame toFrame(water.Key key)
toFrame
in interface Neurons.Vector