Ejemplo n.º 1
0
        public static UpdateGRVm Thermo()
        {
            var initData = SimGridFloatSamples.RandUniform0_1(GridSpan, 1234);
            var ggRet    = new UpdateGRVm(GridSpan, GridSpan, BetaBoundsW, EnergyBoundsW, BetaDelta, ProcIsingIntBitsEnergy,
                                          update_params: UpdateParams);

            ggRet.GraphLatticeVm.SetUpdater(GraphLatticeVmEx.DrawGridCell_float_BW_mod256, initData);
            ggRet.UpdateVm.OnUpdateUI.Subscribe(p => UpdateGGView(p, ggRet));

            Thermal_bp.Init(initData.Data, initData.Width, BlockSize);

            return(ggRet);
        }
Ejemplo n.º 2
0
        public static UpdateGRVm Thermo()
        {
            var initTemps = SimGridFloatSamples.HiLow(GridSpan, 0.99f, 0.01f);
            var initFlips = SimGridIntSamples.SquareRandBits(GridSpan, 5213);
            var ggRet     = new UpdateGRVm(GridSpan, GridSpan, BetaBoundsW, EnergyBoundsW, BetaDelta,
                                           ProcIsingIntBitsEnergy, update_params: UpdateParams);

            ggRet.GraphLatticeVm.SetUpdater(GraphLatticeVmEx.DrawGridCell_int_BW_mod256, initFlips);
            // ggRet.GraphLatticeVm.SetUpdater(GraphLatticeVmEx.DrawGridCell_float_BW_mod256, initTemps);

            ggRet.UpdateVm.OnUpdateUI.Subscribe(p => UpdateGGView(p, ggRet));

            ThermalIsing_bp.Init(initTemps.Data, initFlips.Data, initTemps.Width, BlockSize, 4456);

            return(ggRet);
        }
Ejemplo n.º 3
0
        public static UpdateGGRVm Thermo()
        {
            //var initTemps = SimGridFloatSamples.HiLow(GridSpan, 0.99f, 0.01f);
            var initTemps = SimGridFloatSamples.LeftRightGradient(GridSpan);


            var initFlips = SimGridIntSamples.SquareRandBits(GridSpan, 5213);
            var ggRet     = new UpdateGGRVm(
                width: GridSpan,
                height: GridSpan,
                beta: Beta,
                flipEnergy: FlipEnergy,
                qRate: qRate,
                proc: ProcH,
                update_params: UpdateParams);

            ggRet.GraphLatticeFlipVm.SetUpdater(GraphLatticeVmEx.DrawGridCell_int_BW_mod256, initFlips);
            ggRet.GraphLatticeTempVm.SetUpdater(GraphLatticeVmEx.DrawGridCell_float_BW_mod256, initTemps);

            ggRet.UpdateVm.OnUpdateUI.Subscribe(p => UpdateGGView(p, ggRet));

            ThermalIsing_bp.Init(initTemps.Data, initFlips.Data, initTemps.Width, BlockSize, 5566);
            return(ggRet);
        }