public HarmonicOscillatorModelingResultViewModel(Tuple <List <double>, List <double>, List <double>, List <double> > numeric,
                                                  Tuple <List <double>, List <double>, List <double>, List <double> > analytical) : this(numeric)
 {
     for (var i = 0; i < numeric.Item1.Count; ++i)
     {
         AnalyticalXt.Add(new ObservablePoint(analytical.Item1[i], analytical.Item2[i]));
         AnalyticalVt.Add(new ObservablePoint(analytical.Item1[i], analytical.Item3[i]));
         AnalyticalE.Add(new ObservablePoint(analytical.Item1[i], analytical.Item4[i]));
     }
     Collection.Add(new LineSeries()
     {
         Values = AnalyticalXt
     });
     HasAnalytical = true;
 }
Example #2
0
 public HorizontalThrowModelingResultViewModel(
     Tuple <List <double>, List <Tuple <double, double> >, List <Tuple <double, double> > > numericValues,
     Tuple <List <double>, List <Tuple <double, double> >, List <Tuple <double, double> > > analyticalValues) : this(numericValues)
 {
     List <double> ts = analyticalValues.Item1;
     List <Tuple <double, double> > xy = analyticalValues.Item2, vs = analyticalValues.Item3;
     for (int i = 0; i < ts.Count; ++i)
     {
         AnalyticalYt.Add(new ObservablePoint(ts[i], xy[i].Item2));
         AnalyticalXt.Add(new ObservablePoint(ts[i], xy[i].Item1));
         AnalyticalYx.Add(new ObservablePoint(xy[i].Item1, xy[i].Item2));
         AnalyticalVxt.Add(new ObservablePoint(ts[i], vs[i].Item1));
         AnalyticalVyt.Add(new ObservablePoint(ts[i], vs[i].Item2));
     }
     Collection.Add(new LineSeries()
     {
         Values = AnalyticalYx
     });
     HasAnalytical = true;
 }