function SparseMatrix (data, datatype) {
    if (!(this instanceof SparseMatrix)) { throw new SyntaxError('Constructor must be called with the new operator') }
    if (datatype && !isString(datatype)) { throw new Error('Invalid datatype: ' + datatype) }

    if (isMatrix(data)) {
      // create from matrix
      _createFromMatrix(this, data, datatype)
    } else if (data && isArray(data.index) && isArray(data.ptr) && isArray(data.size)) {
      // initialize fields
      this._values = data.values
      this._index = data.index
      this._ptr = data.ptr
      this._size = data.size
      this._datatype = datatype || data.datatype
    } else if (isArray(data)) {
      // create from array
      _createFromArray(this, data, datatype)
    } else if (data) {
      // unsupported type
      throw new TypeError('Unsupported type of data (' + typeOf(data) + ')')
    } else {
      // nothing provided
      this._values = []
      this._index = []
      this._ptr = [0]
      this._size = [0, 0]
      this._datatype = datatype
    }
  }
Sparse Matrix implementation. This type implements
a [Compressed Column Storage](https://en.wikipedia.org/wiki/Sparse_matrix#Compressed_sparse_column_(CSC_or_CCS))
format for two-dimensional sparse matrices.
@class SparseMatrix