public List <PointsDSReed> returnAssistLat() { List <PointsDSReed> value = new List <PointsDSReed>(); List <XElement> rechExo = Exercice(); foreach (var el in rechExo) { XElement Initial = el.Element("AssistLat"); List <XElement> ListVal = (from el2 in Initial.Elements("Valeur") select el2).ToList(); int i = 0; double moy = 0; foreach (var el3 in ListVal) { moy += ConvertDouble(el3); i++; } moy /= i; double somme = 0; foreach (var el3 in ListVal) { somme += Math.Pow((ConvertDouble(el3) - moy), 2); } double dvStand = Math.Sqrt(somme / i); PointsDSReed p = new PointsDSReed(moy, dvStand); value.Add(p); } return(value); }
public List <PointsDSReed> returnTemp() { List <PointsDSReed> value = new List <PointsDSReed>(); List <XElement> rechExo = Exercice(); foreach (var el in rechExo) { double p; p = ConvertDouble(el.Element("Temps")); PointsDSReed point = new PointsDSReed(p, 0); value.Add(point); } return(value); }