public static RDKitSparseVector FromSIV(SparseIntVect64 vector) { var o = new RDKitSparseVector() { Size = vector.Count(), }; o.Nonzero = new Dictionary<long, int>(); foreach (var e in vector.getNonzero()) { o.Nonzero.Add(e.first, e.second); } return o; }
public static Long_Pair_Vect GetNonzero(this SparseIntVect64 v) => v.getNonzero();