Example #1
0
 private void ProcessData()
 {
     m_ProccesedData = EdgeData.AllocateLike(m_Data);
     foreach (var i in m_ProccesedData.Bounds.EnumerateEdge())
     {
         m_ProccesedData[i] = m_Data[i] / TotalSimulations;
     }
 }
Example #2
0
        public void Reset()
        {
            m_Data = EdgeData.AllocateLike(m_Data);
            ProcessData();
            TotalSimulations  = 0;
            AverageTravelPath = 0;
            TotalSimTime      = 0;

            SimulationInfo = new StSimulationInfo(TotalSimulations, AverageTravelPath, TotalSimTime);
            LastPath       = new StParticlePath(StartLocation, null, new List <GridIndex>());
        }
Example #3
0
        public StSimulator(SimulationOptions options)
        {
            Size          = options.Size;
            StartLocation = options.StartLocation;

            m_Data          = EdgeData.AllocateNew(Size);
            m_ProccesedData = EdgeData.AllocateLike(m_Data);

            SimulationInfo = new StSimulationInfo(TotalSimulations, AverageTravelPath, TotalSimTime);
            LastPath       = new StParticlePath(StartLocation, null, new List <GridIndex>());
        }
Example #4
0
        public EdgeData GetData()
        {
            var prData = m_PrSimulator.GetData();
            var stData = m_StSimulator.GetData();
            var data   = EdgeData.AllocateLike(stData);

            foreach (var i in stData.Bounds.EnumerateEdge())
            {
                data[i] = stData[i] - prData[i];
            }
            return(data);
        }