public UpdateIsingBpVm(SimGrid <int> data) { UpdateVm = new UpdateVm(proc: Proc, containingVm: this, update_params: UpdateParams) { StepsPerUpdate = 1 }; Rects = new List <RV <float, Color> >(); GraphVm = new GraphVm(new R <float>(0, 3, 0, 4)) { Title = "Energy vs Temp", TitleX = "Temp", TitleY = "Energy" }; GraphLatticeVm = new GraphLatticeVm( new R <uint>(0, 512, 0, 512), "", "", ""); GraphLatticeVm.SetUpdater(DrawGridCell, data); Beta = 1.08f; UpdateVm.OnUpdateUI.Subscribe(p => KeepUpdating(p)); BlockPick.Init(data.Data, data.Width, 4); Beta = _betaMin; }
public UpdateIsingDualTempVm(SimGrid <int> data) { UpdateVm = new UpdateVm(proc: Proc, containingVm: this, update_params: Update) { StepsPerUpdate = 1 }; Rects = new List <RV <float, Color> >(); Points = new List <P2V <float, Color> >(); GraphVm = new GraphVm(new R <float>(0, 3, 0, 4)) { Title = "Energy vs Temp", TitleX = "Temp", TitleY = "Energy" }; GraphLatticeVm = new GraphLatticeVm( new R <uint>(0, data.Width, 0, data.Height), "", "", ""); GraphLatticeVm.SetUpdater(DrawGridCell, data); BetaLow = 1.08f; BetaHigh = 2.08f; BetaDelta = 0.00001f; UpdateVm.OnUpdateUI.Subscribe(p => KeepUpdating(p)); IsingIntBits.Init(data.Data, data.Width); }
public UpdateGridVm(SimGrid <int> data, Func <object, ProcResult> proc, Action <object> update_params) { UpdateVm = new UpdateVm(proc: proc, containingVm: this, update_params: update_params) { StepsPerUpdate = 1 }; GraphLatticeVm = new GraphLatticeVm( new R <uint>(0, data.Height, 0, data.Width), "", "", ""); }
public UpdateGaVm(GaData gaSortingData, uint width, uint height, uint order, double sorterWinRate, double sortableWinRate, uint sorterCount, uint stageCount, uint sortableCount, Func <object, ProcResult> proc, Action <object> update_params) { UpdateVm = new UpdateVm(proc: proc, containingVm: this, update_params: update_params) { StepsPerUpdate = 10 }; UpdateVm.OnUpdateUI.Subscribe(p => KeepUpdating(p)); GaSortingData = gaSortingData; Order = order; SorterWinRate = sorterWinRate; SortableWinRate = sortableWinRate; SorterCount = sorterCount; SortableCount = sortableCount; StageCount = stageCount; }
public UpdateGGRVm(uint width, uint height, float beta, float flipEnergy, float qRate, Func <object, ProcResult> proc, Action <object> update_params) { LatticeDisplayBounds = new R <uint>( minX: 0, maxX: (width > 1000) ? 1000 : width, minY: 0, maxY: (height > 1000) ? 1000 : height ); UpdateVm = new UpdateVm(proc: proc, containingVm: this, update_params: update_params) { StepsPerUpdate = 100 }; GraphLatticeTempVm = new GraphLatticeVm(LatticeDisplayBounds, "Temps", "", ""); GraphLatticeFlipVm = new GraphLatticeVm(LatticeDisplayBounds, "Flips", "", ""); Beta = beta; FlipEnergy = flipEnergy; Qrate = qRate; }
public UpdateGRVm(uint width, uint height, I <float> betaBounds, I <float> energyBounds, float betaDelta, Func <object, ProcResult> proc, Action <object> update_params) { BetaBounds = betaBounds; EnergyBounds = energyBounds; LatticeDisplayBounds = new R <uint>( minX: 0, maxX: (width > 1000) ? 1000 : width, minY: 0, maxY: (height > 1000) ? 1000 : height ); GraphDisplayBounds = new R <float>( minX: BetaBounds.Min, maxX: BetaBounds.Max, minY: EnergyBounds.Min, maxY: EnergyBounds.Max ); UpdateVm = new UpdateVm(proc: proc, containingVm: this, update_params: update_params) { StepsPerUpdate = 100 }; GraphVm = new GraphVm(GraphDisplayBounds) { Title = "Energy vs Temp", TitleX = "Temp", TitleY = "Energy" }; GraphLatticeVm = new GraphLatticeVm(LatticeDisplayBounds, "", "", ""); BetaDelta = betaDelta; Beta = BetaBounds.Min; }
public JsonResult Update([FromBody] UpdateVm entity) { var result = _mongodbHelper.UpdateOne(entity.guid, entity.status); return(Json(result ? "成功" : "失败")); }