Exemple #1
0
        // INITIALIZATION

        public static SparseVectorStorage <T> OfVector(VectorStorage <T> vector)
        {
            var storage = new SparseVectorStorage <T>(vector.Length);

            vector.CopyToUnchecked(storage, ExistingData.AssumeZeros);
            return(storage);
        }
        // INITIALIZATION

        public static DenseVectorStorage <T> OfVector(VectorStorage <T> vector)
        {
            var storage = new DenseVectorStorage <T>(vector.Length);

            vector.CopyToUnchecked(storage, skipClearing: true);
            return(storage);
        }