Exemplo n.º 1
0
        public void SET_Matrixes()
        {
            var set = new SetValue("otherset", true); //sorted

            set.Set.Add(4);
            set.Set.Add(1);

            var mat = set.ToMatrix();

            TestValue(F("Length(newSet({0}, 4, \"2\", 1).SetToMatrix())", setNameA), 2);
            TestValue(F("newSet({0}, 1, \"2\", 4).SetToMatrix()", setNameA), mat);
            TestValue(F("TToMatrix(newSet({0}, 1, \"2\", 4))", setNameA), mat);

            TestValue(F("newSet({0}, [4, 1]).SetCount()", setNameA), 2);

            TestValue(F("r1=newRandomSet(\"\", 100, 1000, 1); m=r1.SetToMatrix(); r2=newSet(\"\", m); r1==r2", setNameA), 1);
        }
Exemplo n.º 2
0
        public void SET_Matrixes()
        {
            var set = new SetValue("otherset", true); //sorted
            set.Set.Add(4);
            set.Set.Add(1);

            var mat = set.ToMatrix();

            TestValue(F("Length(newSet({0}, 4, \"2\", 1).SetToMatrix())", setNameA), 2);
            TestValue(F("newSet({0}, 1, \"2\", 4).SetToMatrix()", setNameA), mat);
            TestValue(F("TToMatrix(newSet({0}, 1, \"2\", 4))", setNameA), mat);

            TestValue(F("newSet({0}, [4, 1]).SetCount()", setNameA), 2);

            TestValue(F("r1=newRandomSet(\"\", 100, 1000, 1); m=r1.SetToMatrix(); r2=newSet(\"\", m); r1==r2", setNameA), 1);
        }