Exemplo n.º 1
0
        public void StringRepresentTest()
        {
            DoublePoint target   = new DoublePoint(5);
            string      expected = "(5)";
            string      actual;

            actual = target.StringRepresent();
            Assert.AreEqual(expected, actual);
        }
        /// <summary>
        /// Creates new pointSet
        /// equal intervals in point
        /// </summary>
        override public PointSet Create()
        {
            Console.Write("DoubleInitialization_RegularBetweenToPoints: ");
            Console.WriteLine(_left.StringRepresent() + "-" + _right.StringRepresent());
            PointSet ps = new PointSet();

            for (int i = 0; i < _howMany; i++)
            {
                double[] values = new double[_left.Size];
                for (int j = 0; j < _left.Size; j++)
                {
                    values[j] = _left.PointValues[j] + (_right.PointValues[j] - _left.PointValues[j]) / (_howMany - 1) * i;
                }
                ps.Add(new DoublePoint(values));
            }

            return(ps);
        }