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); }
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); }
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); }