Exemplo n.º 1
0
        internal async Task <bool> Create(MainViewModel vm, IList frqs, IList deps, IList pols, IList stats)
        {
            VectorDic = new Dictionary <int, BDataVector>();

            Vectors = new List <BDataVector>();

            await Task.Run(() =>
            {
                //Create a vector
                foreach (string p in pols)
                {
                    int pKey = p.ToPolKey();

                    if (!POLs.Contains(p))
                    {
                        POLs.Add(p);
                    }


                    //        BDataObject child = new BDataObject(p);


                    foreach (double d in deps)
                    {
                        if (!Depressions.Contains(d))
                        {
                            Depressions.Add(d);
                        }

                        foreach (double f in frqs)
                        {
                            if (!Frequencies.Contains(f))
                            {
                                Frequencies.Add(f);
                            }

                            vm.VectorCurrent++;

                            BDataVector vector = new BDataVector(d, f, p, pKey);
                            vector.Create360DegData(vm, stats);
                            vector.FinalizePOLKey(pKey);


                            VectorDic.Add(vector.KeyFreqDepPol, vector);

                            Vectors.Add(vector);
                        }
                    }
                }
            });



            return(true);
        }
Exemplo n.º 2
0
 public BDataObject(string pol)
 {
     POLs.Add(pol);
 }