public CriticalityVariations(CriticalityVariations criticalityVariations) { characteristicValues = new structCharacteristicValues(criticalityVariations.CharacteristicValues.initial); foreach (CriticalityVariation v in criticalityVariations) { this.AddVariation(v); } }
public void CalculateCharacteristicValues(double initialValue) { characteristicValues = new structCharacteristicValues(initialValue); timeSpan = 0; foreach (CriticalityVariation cv in this) { timeSpan += cv.length; characteristicValues.final += cv.variation; characteristicValues.max = Math.Max(characteristicValues.max, characteristicValues.final); characteristicValues.min = Math.Min(characteristicValues.min, characteristicValues.final); } }
/// <summary> /// Constructeur avec une valeur initiale non nulle /// </summary> /// <param name="initialValue"></param> public CriticalityVariations(double initialValue) { characteristicValues = new structCharacteristicValues(initialValue); }