Results 1 to 2 of 2
- 03-09-2013, 12:42 PM #1
Member
- Join Date
- Mar 2013
- Posts
- 11
- Rep Power
- 0
How can I pick random indices of a matrix with a constraints?
I want to create a matrix like this one:
0000000000
0101110000
1111100000
0110100000
0010000000
0000000000
that is to say I want to randomly to pick indices for the second row to put 1's in a fixed number of cells, and I want that from the third row to put 1's in each cell but I have to allow a clear path of 1's from the third row to the second row (and it's also needs to be randomly - the pick of the indices in the third row) - any suggestions?
- 03-09-2013, 01:13 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
Re: How can I pick random indices of a matrix with a constraints?
I posted a reply in your other thread: http://www.java-forums.org/new-java/...reference.html, don't ignore replies.
kind regards,
JosBuild a wall around Donald Trump; I'll pay for it.
Similar Threads
-
How can i generate random indices of a matrix cell?
By dredd in forum New To JavaReplies: 2Last Post: 03-08-2013, 06:48 PM -
Pick a random value from array?
By RattleSnake in forum New To JavaReplies: 2Last Post: 04-26-2011, 06:36 AM -
Pick random array index and change the element value
By Space Ranger in forum New To JavaReplies: 8Last Post: 03-29-2011, 11:18 PM -
How to: Select specific array indices?
By louist in forum New To JavaReplies: 3Last Post: 03-07-2011, 11:21 PM -
DnD - JList indices
By carderne in forum New To JavaReplies: 0Last Post: 03-09-2009, 07:03 AM
Bookmarks