Questions tagged [discrete-space]
21 questions
11
votes
6 answers
discrete event simulators for C++
I am currently looking for a discrete event simulator written for C++. I did not find much on the web written specifically in OO-style; there are some, but outdated. Some others, such as Opnet, Omnet and ns3 are way too complicated for what I need…

Bob
- 10,741
- 27
- 89
- 143
5
votes
6 answers
Determining probability mass function of random variable
If we have a discrete random variable x and the data pertaining to it in X(n), how in matlab can we determine the probability mass function pmf(X)?

SkypeMeSM
- 3,197
- 8
- 43
- 61
4
votes
1 answer
Matlab's slice() function not working as desired
I want to plot discrete 2D images at 13 z locations at [4:4:52] using the following lines of code.
a=100;
[mesh.x,mesh.y,mesh.z] =…
user238469
3
votes
2 answers
How to make Conditional Probability Tables (CPTs) for Bayesian networks with pymc
I would like to build a Bayesian network of discrete (pymc.Categorical) variables that are dependent on other categorical variables.
As a simplest example, suppose variables a and b are categorical and b depends on a
Here is an attempt to code it…

shpigi
- 185
- 2
- 8
2
votes
2 answers
Find all points of a grid within a circle, ordered by norm
How would you solve the problem of finding the points of a (integer) grid within a circle centered on the origin of the axis, with the results ordered by norm, as in distance from the centre, in C++?
I wrote an implementation that works (yeah, I…

japs
- 1,286
- 13
- 27
2
votes
1 answer
How to do 1D discrete collision detection as efficiently as possible?
I have the following situation. There are M independent random walkers on the discrete domain 0, 1, ..., L. We do this for N identical domains. This results in a matrix X where X[i, j] is the position of walker i on domain j. To make a random step,…

R van Genderen
- 127
- 1
- 6
2
votes
2 answers
Matlab : Phase space plot
I am a beginner into chaos and nonlinear dynamics. I was trying to plot the phase space plot for Tent Map using Matlab. A phase space plot is a plot of its independent variables. So, if a system has one variable, then it will be a plot of the…

SKM
- 959
- 2
- 19
- 45
1
vote
2 answers
How to do space discretization in Gekko?
The goal is to minimize time to complete the lap with Energy constraint this is why my objective is the integral of the speed over distance, but I can’t seem to figure out how to derive and integrate over distance and not time(dt).

trimat
- 101
- 4
1
vote
1 answer
Coordinate geometry operations in images/discrete space
I have images which have line segments, rays etc. I am representing these line segments using Bresenham algorithm (means whatever coordinates I get using this algorithm between two points). Now I want to do operations such as finding intersection…

avd
- 13,993
- 32
- 78
- 99
1
vote
1 answer
Using Gaussian family distribution to predict discrete quantities in GLM
Is it OK(legitimate approach) to use Generalized Linear Model with Gaussian family distribution to predict discrete quantities by for example rounding the output of Gaussian GLM to the nearest integer?

user1533224
- 13
- 2
0
votes
2 answers
Mutate an array of discrete probabilities by excluding one value in C
I am working in a project in C where I want to progressively mutate a uint32_t under the following conditions:
The probability of a bit flip starts out with probability 1/2 for the least significant bit (LSB), then 1/4 for the next bit to the left,…

Adam Hyland
- 878
- 1
- 9
- 21
0
votes
0 answers
In Gym + TF-Agents context, how to make actions space as a function of the current state masking impossible actions
I saw other old posts spinning around this topic, but the general answers given were like "don't care, let the NN learn that, in that specific state, it cannot take some actions punishing it!". Well, I don't like it! For several reasons:
many…

fede72bari
- 343
- 5
- 17
0
votes
0 answers
Defining action space in tuple with fixed interval In OpenAI gym
I was trying to define tuple action space in my customized env as ,
parameters_max = np.array([1, +1])
shape = np.array([0.1, 0.1])
self.action_space = spaces.Tuple((spaces.Discrete(3),spaces.Box(parameters_min, parameters_max, shape)))```
where…
0
votes
1 answer
Trouble with visualizer.pl
I'm trying to use visualizer.pl to visualize the dynamics of multi-state system
my function file:
f1 := x2
f2 := x1+x2*x3
f3 := x3^2+x1+x2+1
I used the following command as mentioned in "readme.txt"
perl visualizer.pl -p 1.txt 3 3
since prime :=…

Educ
- 151
- 1
- 3
- 14
0
votes
1 answer
How to create queue of events in order by date
I am trying to create a queue of events and I want to be able to insert and delete from the middle of the queue in constant time, something like this:
3446 --- 9493 --- 15969 --- 48381
where the number could be millis from now, or whatnot.
How…
user12211419