Beispiel #1
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;
        }
Beispiel #2
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);
        }
Beispiel #3
0
        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;
        }