コード例 #1
0
        public void TestSparseF32MatrixToBase64()
        {
            var bounds = new Sz2 <int>(3, 5);
            var aIn    = GenMatrix.RandSparseF32(bounds, 8, 123);
            var base64 = MathNetConv.SparseF32MatrixToBase64(aIn);
            var aOut   = MathNetConv.Base64ToSparseF32Matrix(bounds, base64.Item1, base64.Item2, base64.Item3);

            Assert.IsTrue(aIn.IsSameAs(aOut));
        }
コード例 #2
0
        public void TestDenseF32MatrixToBase64()
        {
            var bounds = new Sz2 <int>(3, 5);
            var aIn    = GenMatrix.DenseUF32(bounds, 123);
            var base64 = MathNetConv.DenseF32MatrixtoBase64(aIn);
            var aOut   = MathNetConv.Base64ToDenseF32Matrix(bounds, base64);

            Assert.IsTrue(aIn.IsSameAs(aOut));
        }