예제 #1
0
        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);
        }
예제 #2
0
        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;
        }