Ejemplo n.º 1
0
        private void CalculateDataExtents()
        {
            double[] TempNumberSet = new double[Points.Count];
            NumericSum = 0;

            for (int i = 0; i < Points.Count; i++)
            {
                DataPt Pt = Points[i];

                TempNumberSet[i] = Pt.Number;
                NumericSum      += Pt.Number;
            }

            Array.Sort(TempNumberSet);

            NumericBounds = new wDomain(TempNumberSet[0], TempNumberSet[TempNumberSet.Count() - 1]);
        }
Ejemplo n.º 2
0
        private List <DataPt> ObjectListToDataPointList(List <object> objects)
        {
            List <DataPt> DataPoints = new List <DataPt>();

            double[] TempNumberSet = new double[objects.Count];
            NumericSum = 0;

            for (int i = 0; i < objects.Count; i++)
            {
                wObject W  = (wObject)objects[i];
                DataPt  Pt = (DataPt)W.Element;
                DataPoints.Add((DataPt)W.Element);

                TempNumberSet[i] = Pt.Number;
                NumericSum      += Pt.Number;
            }

            Array.Sort(TempNumberSet);
            NumericBounds = new wDomain(TempNumberSet[0], TempNumberSet[TempNumberSet.Count() - 1]);

            return(DataPoints);
        }