SparseVector Type

Constructors

Constructor Description

SparseVector(n)

Full Usage: SparseVector(n)

Parameters:
    n : int - Length of the vector

Constructs a sparse vector with all zeros

n : int

Length of the vector

SparseVector(items, indices, n)

Full Usage: SparseVector(items, indices, n)

Parameters:
    items : float[] - The nonzero entries
    indices : int[] - The locations of the nonzeros
    n : int - Length of the vector

Constructs a sparse vector with defined nonzero elements

items : float[]

The nonzero entries

indices : int[]

The locations of the nonzeros

n : int

Length of the vector

Instance members

Instance member Description

this.Clone

Full Usage: this.Clone

Returns: SparseVector

Returns: SparseVector

this.[arg1]

Full Usage: this.[arg1]

Returns: int The ith element of a sparse vector

Public accessor method

Returns: int

The ith element of a sparse vector

this.Length

Full Usage: this.Length

Returns: int

Length of the sparse vector

Returns: int