public class SparseVector$ extends Object implements scala.Serializable
Modifier and Type | Field and Description |
---|---|
static SparseVector$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
SparseVector$() |
Modifier and Type | Method and Description |
---|---|
SparseVector |
fromCOO(int size,
scala.collection.Iterable<scala.Tuple2<Object,Object>> entries)
Constructs a sparse vector from a coordinate list (COO) representation where each entry
is stored as a tuple of (index, value).
|
SparseVector |
fromCOO(int size,
scala.collection.Seq<scala.Tuple2<Object,Object>> entries)
Constructs a sparse vector from a coordinate list (COO) representation where each entry
is stored as a tuple of (index, value).
|
SparseVector |
fromCOO(int size,
scala.Tuple2<Object,Object> entry)
Convenience method to be able to instantiate a SparseVector with a single element.
|
Object |
sparseVectorConverter()
BreezeVectorConverter implementation for
SparseVector |
public static final SparseVector$ MODULE$
public SparseVector fromCOO(int size, scala.collection.Seq<scala.Tuple2<Object,Object>> entries)
size
- The number of elements in the vectorentries
- The values in the vectorSparseVector
public SparseVector fromCOO(int size, scala.collection.Iterable<scala.Tuple2<Object,Object>> entries)
size
- The number of elements in the vectorentries
- An iterator supplying the values in the vectorSparseVector
public SparseVector fromCOO(int size, scala.Tuple2<Object,Object> entry)
size
- The number of elements in the vectorentry
- The value in the vectorSparseVector
public Object sparseVectorConverter()
SparseVector
This allows to convert Breeze vectors into SparseVector
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.