private bool IsEqual(SparseVectorD other) { if (Length != other.Length) { return(false); } return(ArrayHelpers.ArraysEqual(_values, other._values) && ArrayHelpers.ArraysEqual(_indices, other._indices)); }
public static VectorXD ToDense(this SparseVectorD sparseVectorD) { return(new VectorXD(Enumerable.Range(0, sparseVectorD.Length).Select(i => sparseVectorD.Get(i)).ToArray())); }