Beispiel #1
0
        public void TestCompressVertices()
        {
            List <float> verticesBuffer = new List <float>()
            {
                3, 2, -1, 0, -5, 2
            };

            Compression compression = new Compression(verticesBuffer, 1);

            compression.CompressFrames(1);

            Assert.AreEqual(Vector <float> .Build.DenseOfArray(new float[] { 1.5f, -1.5f, 0.5f }), compression.AverageTrajectory);
            Assert.AreEqual(Matrix <float> .Build.DenseOfArray(new float[, ] {
                { -0.2509f }, { -0.935f }, { 0.2509f }
            }), compression.SubEigenVectors);
            Assert.AreEqual(Matrix <float> .Build.DenseOfArray(new float[, ] {
                { -1.2202f, 6.8302f }
            }), compression.ControlTrajectories);
        }