private void ProcessData() { m_ProccesedData = EdgeData.AllocateLike(m_Data); foreach (var i in m_ProccesedData.Bounds.EnumerateEdge()) { m_ProccesedData[i] = m_Data[i] / TotalSimulations; } }
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>()); }
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>()); }
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); }