/// <summary> /// Перемножение эпюры на число /// </summary> /// <param name="mEpure"></param> /// <param name="x"></param> /// <returns></returns> public EpureM MultiplicationEpure(double x) { EpureM newEpureM = new EpureM(this.Length); for (int i = 0; i < this.Length; i++) { newEpureM.epureLines[i] = this.epureLines[i].MultiplicationEpureLine(x); } return(newEpureM); }
/// <summary> /// Перемножение эпюр(массивов участков) /// </summary> /// <returns></returns> public static double MultiplicationEpure(EpureM m1EpureLines, EpureM m2EpureLines) { double sum = 0; for (int i = 0; i < m1EpureLines.epureLines.Length; i++) { sum += EpureLine.MultiplicationEpureLine(m1EpureLines.epureLines[i], m2EpureLines.epureLines[i]); } return(sum); }
public static EpureM SumEpureM(params EpureM[] epureMs) { EpureM newEpureM = new EpureM(epureMs[0].Length); for (int i = 0; i < newEpureM.Length; i++) { for (int j = 0; j < epureMs.Length; j++) { newEpureM.epureLines[i] = EpureLine.SumEpureLine(epureMs[j].epureLines[i], newEpureM.epureLines[i]); } } return(newEpureM); }