示例#1
0
        public ILinearCollection MultiplyAllValuesWith(double value)
        {
            LinearCollection <T> result = new LinearCollection <T>(this.Length);

            for (int i = 0; i < this.Length; i++)
            {
                result.SetTheValue(i, this.GetTheValue(i) * value);
            }

            return(result);
        }
示例#2
0
        public ILinearCollection DivideAllValuesAsDenominator(double numerator)
        {
            LinearCollection <T> result = new LinearCollection <T>(this.Length);

            for (int i = 0; i < this.Length; i++)
            {
                result.SetTheValue(i, numerator / this.GetTheValue(i));
            }

            return(result);
        }
示例#3
0
        public ILinearCollection SubtractAllValuesFrom(double value)
        {
            LinearCollection <T> result = new LinearCollection <T>(this.Length);

            for (int i = 0; i < this.Length; i++)
            {
                result.SetTheValue(i, value - this.GetTheValue(i));
            }

            return(result);
        }