/// <summary>
        /// Adds a new point based on the given funcions.
        /// </summary>
        public void Update(GraphDataPacket data)
        {
            double x = data.GetData();
            double y = data.GetData();

            AddPoint(x, y);
        }
Exemple #2
0
        public void Update(GraphDataPacket data)
        {
            var list = data.GetSet().ToList();

            list.Sort();

            histo.Clear();

            double range   = list.Last() - list.First();
            double binSize = range / NBins;

            int    currentBin = 0;
            double currentLow = list.First() - binSize;

            histo.Add(new HistoBin(currentLow += binSize));

            foreach (var number in list)
            {
                if (number < currentLow + binSize || histo.Count == NBins)
                {
                    ++histo[currentBin].Num;
                }
                else
                {
                    histo.Add(new HistoBin(currentLow += binSize));
                    ++currentBin;
                }
            }

            for (int i = 0; i < histo.Count; ++i)
            {
                geoList[i].Rect = new System.Windows.Rect(histo[i].LowEdge, 0, binSize, histo[i].Num);
            }
        }
Exemple #3
0
 public void Update(GraphDataPacket data)
 {
     for (int i = 0; i < timelines.Count; ++i)
     {
         timelines[i].Update(data);
     }
 }
 public void Update(GraphDataPacket data)
 {
     foreach (var graph in graphs)
     {
         graph.Update(data);
     }
 }
        public void Update(GraphDataPacket data)
        {
            for (int i = 0; i < entries.Count; ++i)
            {
                entries[i].Update(data);
            }

            Sort();
        }
Exemple #6
0
        public void Update(GraphDataPacket data)
        {
            double value = data.GetData();

            if (TextFunction != null)
            {
                AlertText = TextFunction(value);
            }
            NumberOnRight = value;
        }
        public void Update(GraphDataPacket data)
        {
            // This peels off an extraneous size variable we don't want
            data.GetData();

            foreach (var entry in entries)
            {
                entry.Update(data);
            }

            Sort();
        }
        private bool GetNextTurn()
        {
            if (br.BaseStream.Position >= br.BaseStream.Length)
            {
                return(false);
            }
            var newTurn = new GraphicTurnSet(br);
            var stats   = new GraphDataPacket(br);

            CurrentTurn = new CompleteTurn(newTurn, stats);
            return(true);
        }
        public void Update(GraphDataPacket data)
        {
            double value = data.GetData();

            if (TextFunction != null)
            {
                AlertText = TextFunction(value);
            }
            NumberOnRight = value;
            // This is a kludge that should be done better
            if (NumberOnRight == 0)
            {
                NumberOnRight = nUpdates - 100000;
            }
            else
            {
                ++nUpdates;
            }
        }
Exemple #10
0
 public PackagedCommands(CommandSet <TVisualizer> commands, GraphDataPacket data, double time)
 {
     Commands = commands;
     Data     = data;
     Time     = time;
 }
Exemple #11
0
 public CompleteTurn(GraphicTurnSet graphics, GraphDataPacket statistics)
 {
     Graphics   = graphics;
     Statistics = statistics;
 }
 public void Update(GraphDataPacket data)
 {
     InternalGraph.Update(data);
     InvalidateVisual();
 }
 public void Update(GraphDataPacket text)
 {
     TextBlock.Text = text.GetTextData();
 }