How to generate random points without duplication?How to generate a random matrix with specific parameters?How do I keep a random value associated with a locator point as points are added?Generate nonoverlapping random circlesGenerating uniform random points over a binary imageHow to generate a random pulsar graph between two points?How to generate random natural numbers in $[1, infty)$?How to generate random numbers for Beta distribution in a range?3D random walk between two end pointsGenerate a random Fibonacci sequenceGenerating random coordinates (3D) with constraint
Is it legal in the UK for politicians to lie to the public for political gain?
How bad would a partial hash leak be, realistically?
Adding two lambda-functions in C++
What is the advantage of carrying a tripod and ND-filters when you could use image stacking instead?
Building a road to escape Earth's gravity by making a pyramid on Antartica
Can a magnetic field of an object be stronger than its gravity?
Word for a small burst of laughter that can't be held back
How is it possible that Gollum speaks Westron?
How would you say “AKA/as in”?
Why is the relationship between frequency and pitch exponential?
Why did a party with more votes get fewer seats in the 2019 European Parliament election in Denmark?
How could a government be implemented in a virtual reality?
Why don't B747s start takeoffs with full throttle?
Company did not petition for visa in a timely manner. Is asking me to work from overseas, but wants me to take a paycut
When writing an error prompt, should we end the sentence with a exclamation mark or a dot?
Pronoun introduced before its antecedent
You've spoiled/damaged the card
Is there any word or phrase for negative bearing?
Did Darth Vader wear the same suit for 20+ years?
Should I "tell" my exposition or give it through dialogue?
Do adult Russians normally hand-write Cyrillic as cursive or as block letters?
If Boris Johnson were prosecuted and convicted of lying about Brexit, can that be used to cancel Brexit?
X-shaped crossword
Is the decompression of compressed and encrypted data without decryption also theoretically impossible?
How to generate random points without duplication?
How to generate a random matrix with specific parameters?How do I keep a random value associated with a locator point as points are added?Generate nonoverlapping random circlesGenerating uniform random points over a binary imageHow to generate a random pulsar graph between two points?How to generate random natural numbers in $[1, infty)$?How to generate random numbers for Beta distribution in a range?3D random walk between two end pointsGenerate a random Fibonacci sequenceGenerating random coordinates (3D) with constraint
$begingroup$
In generating a list of random 2D integral coordinates e.g. u1,v1, u2,v2, u3,v3,..., how can one write a condition specifying that no point is repeated, i.e no ui,vi == uj,vj?
random
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
In generating a list of random 2D integral coordinates e.g. u1,v1, u2,v2, u3,v3,..., how can one write a condition specifying that no point is repeated, i.e no ui,vi == uj,vj?
random
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
$begingroup$
ui, vi are real numbers?
$endgroup$
– kglr
8 hours ago
$begingroup$
Integers from 0 to 20, so it happens frequently.
$endgroup$
– spaced
8 hours ago
$begingroup$
To add more detail to the question - the points are being generated by an optimization routine (NMaximize); I think the only way I can control for duplicates is by specifying a constraint on the ui, vi being generated.
$endgroup$
– spaced
7 hours ago
add a comment |
$begingroup$
In generating a list of random 2D integral coordinates e.g. u1,v1, u2,v2, u3,v3,..., how can one write a condition specifying that no point is repeated, i.e no ui,vi == uj,vj?
random
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
In generating a list of random 2D integral coordinates e.g. u1,v1, u2,v2, u3,v3,..., how can one write a condition specifying that no point is repeated, i.e no ui,vi == uj,vj?
random
random
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 7 hours ago
user64494
3,90111323
3,90111323
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 8 hours ago
spacedspaced
283
283
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
spaced is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$begingroup$
ui, vi are real numbers?
$endgroup$
– kglr
8 hours ago
$begingroup$
Integers from 0 to 20, so it happens frequently.
$endgroup$
– spaced
8 hours ago
$begingroup$
To add more detail to the question - the points are being generated by an optimization routine (NMaximize); I think the only way I can control for duplicates is by specifying a constraint on the ui, vi being generated.
$endgroup$
– spaced
7 hours ago
add a comment |
$begingroup$
ui, vi are real numbers?
$endgroup$
– kglr
8 hours ago
$begingroup$
Integers from 0 to 20, so it happens frequently.
$endgroup$
– spaced
8 hours ago
$begingroup$
To add more detail to the question - the points are being generated by an optimization routine (NMaximize); I think the only way I can control for duplicates is by specifying a constraint on the ui, vi being generated.
$endgroup$
– spaced
7 hours ago
$begingroup$
ui, vi are real numbers?
$endgroup$
– kglr
8 hours ago
$begingroup$
ui, vi are real numbers?
$endgroup$
– kglr
8 hours ago
$begingroup$
Integers from 0 to 20, so it happens frequently.
$endgroup$
– spaced
8 hours ago
$begingroup$
Integers from 0 to 20, so it happens frequently.
$endgroup$
– spaced
8 hours ago
$begingroup$
To add more detail to the question - the points are being generated by an optimization routine (NMaximize); I think the only way I can control for duplicates is by specifying a constraint on the ui, vi being generated.
$endgroup$
– spaced
7 hours ago
$begingroup$
To add more detail to the question - the points are being generated by an optimization routine (NMaximize); I think the only way I can control for duplicates is by specifying a constraint on the ui, vi being generated.
$endgroup$
– spaced
7 hours ago
add a comment |
4 Answers
4
active
oldest
votes
$begingroup$
RandomSample[Tuples[Range[0, 20], 2], 10]
14, 13, 2, 17, 12, 7, 1, 11, 6, 6, 12, 4, 13, 14, 2,
16, 15, 6, 1, 0
Note: The length of the sample cannot exceed 21^2 (441).
$endgroup$
add a comment |
$begingroup$
Since you mentioned that your coordinates are drawn from integers in the regions 20 >= u >= 0 and 20 >= v >= 0, you can first generate a one-dimensional vector containing all lattice points:
V = Flatten[Table[x[i,j],i,0,20,j,0,20]];
Then you can select a random sample from this vector, e.g.:
RandomSample[V,5]/.x->List
16, 8, 10, 17, 8, 5, 0, 17, 16, 9
Since V has no duplicates, the random sample will also contain no duplicates.
$endgroup$
1
$begingroup$
Or even like this:RandomSample[Flatten[Table[x, y, x, 0, 20, y, 20], 1], 5].
$endgroup$
– kirma
7 hours ago
$begingroup$
Or...RandomSample[x, y /. Solve[(x | y) [Element] Integers, x, y [Element] Rectangle[0, 0, 20, 20]], 10]
$endgroup$
– kirma
7 hours ago
add a comment |
$begingroup$
For 10 points, oversample and select unique ones using RandomSample.
points = RandomInteger[20, 50, 2];
points = RandomSample[points, 10]
Actually, RandomInteger[20, 50, 2] appear to produce 50 unique 2D points.
E.g.
tries = 0;
points = RandomInteger[20, 50, 2];
While[(sample = Quiet[Check[RandomSample[points, 50], True]]),
tries++;]
tries
0
$endgroup$
1
$begingroup$
This doesn't guarantee success. A better approach is probably something likeRandomSample[Range[0,20],10], right?
$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
@spaced I'm not sure I understand your comment, but I feel that it changes the question considerably. It would be better if you were more specific in what you are trying to accomplish (and watch out for XY problems). Also, please edit any extra information directly into the OP rather than in a comment on an answer. Thanks!
$endgroup$
– AccidentalFourierTransform
7 hours ago
add a comment |
$begingroup$
It kind of depends on what you want to do next. You only need to generate one such list, and only once? Then efficiency is not important, and so you can proceed very naively as follows: generate random lists until one works:
Module[l = RandomInteger[0, 20, 10, 2],
While[Length[l] != Length[DeleteDuplicates[l]],
l = RandomInteger[0, 20, 10, 2]];
l
]
On the other hand, if you need many of these lists, then a more efficient approach is as follows: first generate all possible pairs, and pick a random sample ever time you need one such list:
lists = Tuples[Range[0, 20], 2];
sample := RandomSample[lists,10];
Now every time you execute sample you will get one such list, picked at random.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
spaced is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f199522%2fhow-to-generate-random-points-without-duplication%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
RandomSample[Tuples[Range[0, 20], 2], 10]
14, 13, 2, 17, 12, 7, 1, 11, 6, 6, 12, 4, 13, 14, 2,
16, 15, 6, 1, 0
Note: The length of the sample cannot exceed 21^2 (441).
$endgroup$
add a comment |
$begingroup$
RandomSample[Tuples[Range[0, 20], 2], 10]
14, 13, 2, 17, 12, 7, 1, 11, 6, 6, 12, 4, 13, 14, 2,
16, 15, 6, 1, 0
Note: The length of the sample cannot exceed 21^2 (441).
$endgroup$
add a comment |
$begingroup$
RandomSample[Tuples[Range[0, 20], 2], 10]
14, 13, 2, 17, 12, 7, 1, 11, 6, 6, 12, 4, 13, 14, 2,
16, 15, 6, 1, 0
Note: The length of the sample cannot exceed 21^2 (441).
$endgroup$
RandomSample[Tuples[Range[0, 20], 2], 10]
14, 13, 2, 17, 12, 7, 1, 11, 6, 6, 12, 4, 13, 14, 2,
16, 15, 6, 1, 0
Note: The length of the sample cannot exceed 21^2 (441).
answered 7 hours ago
kglrkglr
195k10216439
195k10216439
add a comment |
add a comment |
$begingroup$
Since you mentioned that your coordinates are drawn from integers in the regions 20 >= u >= 0 and 20 >= v >= 0, you can first generate a one-dimensional vector containing all lattice points:
V = Flatten[Table[x[i,j],i,0,20,j,0,20]];
Then you can select a random sample from this vector, e.g.:
RandomSample[V,5]/.x->List
16, 8, 10, 17, 8, 5, 0, 17, 16, 9
Since V has no duplicates, the random sample will also contain no duplicates.
$endgroup$
1
$begingroup$
Or even like this:RandomSample[Flatten[Table[x, y, x, 0, 20, y, 20], 1], 5].
$endgroup$
– kirma
7 hours ago
$begingroup$
Or...RandomSample[x, y /. Solve[(x | y) [Element] Integers, x, y [Element] Rectangle[0, 0, 20, 20]], 10]
$endgroup$
– kirma
7 hours ago
add a comment |
$begingroup$
Since you mentioned that your coordinates are drawn from integers in the regions 20 >= u >= 0 and 20 >= v >= 0, you can first generate a one-dimensional vector containing all lattice points:
V = Flatten[Table[x[i,j],i,0,20,j,0,20]];
Then you can select a random sample from this vector, e.g.:
RandomSample[V,5]/.x->List
16, 8, 10, 17, 8, 5, 0, 17, 16, 9
Since V has no duplicates, the random sample will also contain no duplicates.
$endgroup$
1
$begingroup$
Or even like this:RandomSample[Flatten[Table[x, y, x, 0, 20, y, 20], 1], 5].
$endgroup$
– kirma
7 hours ago
$begingroup$
Or...RandomSample[x, y /. Solve[(x | y) [Element] Integers, x, y [Element] Rectangle[0, 0, 20, 20]], 10]
$endgroup$
– kirma
7 hours ago
add a comment |
$begingroup$
Since you mentioned that your coordinates are drawn from integers in the regions 20 >= u >= 0 and 20 >= v >= 0, you can first generate a one-dimensional vector containing all lattice points:
V = Flatten[Table[x[i,j],i,0,20,j,0,20]];
Then you can select a random sample from this vector, e.g.:
RandomSample[V,5]/.x->List
16, 8, 10, 17, 8, 5, 0, 17, 16, 9
Since V has no duplicates, the random sample will also contain no duplicates.
$endgroup$
Since you mentioned that your coordinates are drawn from integers in the regions 20 >= u >= 0 and 20 >= v >= 0, you can first generate a one-dimensional vector containing all lattice points:
V = Flatten[Table[x[i,j],i,0,20,j,0,20]];
Then you can select a random sample from this vector, e.g.:
RandomSample[V,5]/.x->List
16, 8, 10, 17, 8, 5, 0, 17, 16, 9
Since V has no duplicates, the random sample will also contain no duplicates.
answered 7 hours ago
KagaratschKagaratsch
5,16941351
5,16941351
1
$begingroup$
Or even like this:RandomSample[Flatten[Table[x, y, x, 0, 20, y, 20], 1], 5].
$endgroup$
– kirma
7 hours ago
$begingroup$
Or...RandomSample[x, y /. Solve[(x | y) [Element] Integers, x, y [Element] Rectangle[0, 0, 20, 20]], 10]
$endgroup$
– kirma
7 hours ago
add a comment |
1
$begingroup$
Or even like this:RandomSample[Flatten[Table[x, y, x, 0, 20, y, 20], 1], 5].
$endgroup$
– kirma
7 hours ago
$begingroup$
Or...RandomSample[x, y /. Solve[(x | y) [Element] Integers, x, y [Element] Rectangle[0, 0, 20, 20]], 10]
$endgroup$
– kirma
7 hours ago
1
1
$begingroup$
Or even like this:
RandomSample[Flatten[Table[x, y, x, 0, 20, y, 20], 1], 5].$endgroup$
– kirma
7 hours ago
$begingroup$
Or even like this:
RandomSample[Flatten[Table[x, y, x, 0, 20, y, 20], 1], 5].$endgroup$
– kirma
7 hours ago
$begingroup$
Or...
RandomSample[x, y /. Solve[(x | y) [Element] Integers, x, y [Element] Rectangle[0, 0, 20, 20]], 10]$endgroup$
– kirma
7 hours ago
$begingroup$
Or...
RandomSample[x, y /. Solve[(x | y) [Element] Integers, x, y [Element] Rectangle[0, 0, 20, 20]], 10]$endgroup$
– kirma
7 hours ago
add a comment |
$begingroup$
For 10 points, oversample and select unique ones using RandomSample.
points = RandomInteger[20, 50, 2];
points = RandomSample[points, 10]
Actually, RandomInteger[20, 50, 2] appear to produce 50 unique 2D points.
E.g.
tries = 0;
points = RandomInteger[20, 50, 2];
While[(sample = Quiet[Check[RandomSample[points, 50], True]]),
tries++;]
tries
0
$endgroup$
1
$begingroup$
This doesn't guarantee success. A better approach is probably something likeRandomSample[Range[0,20],10], right?
$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
@spaced I'm not sure I understand your comment, but I feel that it changes the question considerably. It would be better if you were more specific in what you are trying to accomplish (and watch out for XY problems). Also, please edit any extra information directly into the OP rather than in a comment on an answer. Thanks!
$endgroup$
– AccidentalFourierTransform
7 hours ago
add a comment |
$begingroup$
For 10 points, oversample and select unique ones using RandomSample.
points = RandomInteger[20, 50, 2];
points = RandomSample[points, 10]
Actually, RandomInteger[20, 50, 2] appear to produce 50 unique 2D points.
E.g.
tries = 0;
points = RandomInteger[20, 50, 2];
While[(sample = Quiet[Check[RandomSample[points, 50], True]]),
tries++;]
tries
0
$endgroup$
1
$begingroup$
This doesn't guarantee success. A better approach is probably something likeRandomSample[Range[0,20],10], right?
$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
@spaced I'm not sure I understand your comment, but I feel that it changes the question considerably. It would be better if you were more specific in what you are trying to accomplish (and watch out for XY problems). Also, please edit any extra information directly into the OP rather than in a comment on an answer. Thanks!
$endgroup$
– AccidentalFourierTransform
7 hours ago
add a comment |
$begingroup$
For 10 points, oversample and select unique ones using RandomSample.
points = RandomInteger[20, 50, 2];
points = RandomSample[points, 10]
Actually, RandomInteger[20, 50, 2] appear to produce 50 unique 2D points.
E.g.
tries = 0;
points = RandomInteger[20, 50, 2];
While[(sample = Quiet[Check[RandomSample[points, 50], True]]),
tries++;]
tries
0
$endgroup$
For 10 points, oversample and select unique ones using RandomSample.
points = RandomInteger[20, 50, 2];
points = RandomSample[points, 10]
Actually, RandomInteger[20, 50, 2] appear to produce 50 unique 2D points.
E.g.
tries = 0;
points = RandomInteger[20, 50, 2];
While[(sample = Quiet[Check[RandomSample[points, 50], True]]),
tries++;]
tries
0
edited 7 hours ago
answered 8 hours ago
Chris DegnenChris Degnen
22.4k23787
22.4k23787
1
$begingroup$
This doesn't guarantee success. A better approach is probably something likeRandomSample[Range[0,20],10], right?
$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
@spaced I'm not sure I understand your comment, but I feel that it changes the question considerably. It would be better if you were more specific in what you are trying to accomplish (and watch out for XY problems). Also, please edit any extra information directly into the OP rather than in a comment on an answer. Thanks!
$endgroup$
– AccidentalFourierTransform
7 hours ago
add a comment |
1
$begingroup$
This doesn't guarantee success. A better approach is probably something likeRandomSample[Range[0,20],10], right?
$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
@spaced I'm not sure I understand your comment, but I feel that it changes the question considerably. It would be better if you were more specific in what you are trying to accomplish (and watch out for XY problems). Also, please edit any extra information directly into the OP rather than in a comment on an answer. Thanks!
$endgroup$
– AccidentalFourierTransform
7 hours ago
1
1
$begingroup$
This doesn't guarantee success. A better approach is probably something like
RandomSample[Range[0,20],10], right?$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
This doesn't guarantee success. A better approach is probably something like
RandomSample[Range[0,20],10], right?$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
@spaced I'm not sure I understand your comment, but I feel that it changes the question considerably. It would be better if you were more specific in what you are trying to accomplish (and watch out for XY problems). Also, please edit any extra information directly into the OP rather than in a comment on an answer. Thanks!
$endgroup$
– AccidentalFourierTransform
7 hours ago
$begingroup$
@spaced I'm not sure I understand your comment, but I feel that it changes the question considerably. It would be better if you were more specific in what you are trying to accomplish (and watch out for XY problems). Also, please edit any extra information directly into the OP rather than in a comment on an answer. Thanks!
$endgroup$
– AccidentalFourierTransform
7 hours ago
add a comment |
$begingroup$
It kind of depends on what you want to do next. You only need to generate one such list, and only once? Then efficiency is not important, and so you can proceed very naively as follows: generate random lists until one works:
Module[l = RandomInteger[0, 20, 10, 2],
While[Length[l] != Length[DeleteDuplicates[l]],
l = RandomInteger[0, 20, 10, 2]];
l
]
On the other hand, if you need many of these lists, then a more efficient approach is as follows: first generate all possible pairs, and pick a random sample ever time you need one such list:
lists = Tuples[Range[0, 20], 2];
sample := RandomSample[lists,10];
Now every time you execute sample you will get one such list, picked at random.
$endgroup$
add a comment |
$begingroup$
It kind of depends on what you want to do next. You only need to generate one such list, and only once? Then efficiency is not important, and so you can proceed very naively as follows: generate random lists until one works:
Module[l = RandomInteger[0, 20, 10, 2],
While[Length[l] != Length[DeleteDuplicates[l]],
l = RandomInteger[0, 20, 10, 2]];
l
]
On the other hand, if you need many of these lists, then a more efficient approach is as follows: first generate all possible pairs, and pick a random sample ever time you need one such list:
lists = Tuples[Range[0, 20], 2];
sample := RandomSample[lists,10];
Now every time you execute sample you will get one such list, picked at random.
$endgroup$
add a comment |
$begingroup$
It kind of depends on what you want to do next. You only need to generate one such list, and only once? Then efficiency is not important, and so you can proceed very naively as follows: generate random lists until one works:
Module[l = RandomInteger[0, 20, 10, 2],
While[Length[l] != Length[DeleteDuplicates[l]],
l = RandomInteger[0, 20, 10, 2]];
l
]
On the other hand, if you need many of these lists, then a more efficient approach is as follows: first generate all possible pairs, and pick a random sample ever time you need one such list:
lists = Tuples[Range[0, 20], 2];
sample := RandomSample[lists,10];
Now every time you execute sample you will get one such list, picked at random.
$endgroup$
It kind of depends on what you want to do next. You only need to generate one such list, and only once? Then efficiency is not important, and so you can proceed very naively as follows: generate random lists until one works:
Module[l = RandomInteger[0, 20, 10, 2],
While[Length[l] != Length[DeleteDuplicates[l]],
l = RandomInteger[0, 20, 10, 2]];
l
]
On the other hand, if you need many of these lists, then a more efficient approach is as follows: first generate all possible pairs, and pick a random sample ever time you need one such list:
lists = Tuples[Range[0, 20], 2];
sample := RandomSample[lists,10];
Now every time you execute sample you will get one such list, picked at random.
answered 7 hours ago
AccidentalFourierTransformAccidentalFourierTransform
5,55511142
5,55511142
add a comment |
add a comment |
spaced is a new contributor. Be nice, and check out our Code of Conduct.
spaced is a new contributor. Be nice, and check out our Code of Conduct.
spaced is a new contributor. Be nice, and check out our Code of Conduct.
spaced is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f199522%2fhow-to-generate-random-points-without-duplication%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
ui, vi are real numbers?
$endgroup$
– kglr
8 hours ago
$begingroup$
Integers from 0 to 20, so it happens frequently.
$endgroup$
– spaced
8 hours ago
$begingroup$
To add more detail to the question - the points are being generated by an optimization routine (NMaximize); I think the only way I can control for duplicates is by specifying a constraint on the ui, vi being generated.
$endgroup$
– spaced
7 hours ago