예제 #1
0
 public void SelectByColumnIndicesTest()
 {
     Matrix.Deco().Says("rows");
     Matrix.SelectColumns(Seq.From(1, 2, 4)).Deco().Says("selected");
     Matrix.SelectRows(Seq.From(1, 2, 4)).Deco().Says("selected");
     SymmetricMatrix.SelectBy(Matrix, Seq.From(1, 2, 4)).Deco().Says("symmetric selected");
     SymmetricMatrix.LowerTriangular(Matrix).Map(x => x ?? "").Deco().Says("lower triangular");
     SymmetricMatrix.UpperTriangular(Matrix).Map(x => x ?? "").Deco().Says("upper triangular");
 }
예제 #2
0
        public void SelectByColumnIndicesTest()
        {
            var rows = MU::Mat.Init(5, 5, (i, j) => i * j);

            rows.ToMatrix().Deco().Says("rows");
            rows.SelectByColumnIndices(Seq.From(1, 2, 4)).ToMatrix().Deco().Says("selected");
            SymmetricMatrix.SelectBy(rows, Seq.From(1, 2, 4)).ToMatrix().Deco().Says("symmetric selected");
            SymmetricMatrix.LowerTriangular(rows).ToMatrix().Deco().Says("lower triangular");
            SymmetricMatrix.UpperTriangular(rows).ToMatrix().Deco().Says("upper triangular");
        }