15,964,197 members
Home / Discussions / Algorithms

# Algorithms

 Re: Base building in a RTS based on a queue of orders Calin Negru30-Apr-23 5:23 Calin Negru 30-Apr-23 5:23
 Re: Re: Base building in a RTS based on a queue of orders Gerry Schmitz30-Apr-23 6:14 Gerry Schmitz 30-Apr-23 6:14
 Re: Re: Base building in a RTS based on a queue of orders Calin Negru30-Apr-23 22:12 Calin Negru 30-Apr-23 22:12
 Re: Re: Base building in a RTS based on a queue of orders Gerry Schmitz1-May-23 0:08 Gerry Schmitz 1-May-23 0:08
 Re: [edited]Re: Base building in a RTS based on a queue of orders Calin Negru30-Apr-23 5:10 Calin Negru 30-Apr-23 5:10
 Re: [edited]Re: Base building in a RTS based on a queue of orders Gerry Schmitz30-Apr-23 6:29 Gerry Schmitz 30-Apr-23 6:29
 Efficiently finding position in sorted list Robert Ellis26-Mar-23 13:52 Robert Ellis 26-Mar-23 13:52
 Re: Efficiently finding position in sorted list Mircea Neacsu26-Mar-23 14:42 Mircea Neacsu 26-Mar-23 14:42
 Hmm, if I understand correctly, we have a list of Q positions where each one has a specific range say: 1 - [m_1, u_1] 2 - [m_2, u_2] ... q - [m_q, u_q] where m_1 to m_q are the minimum values and u_1 to u_q are the maximum (upper) values. A valid arrangement (I wouldn't call it a permutation) V = [v_1, v_2, ... v_q] can be "normalized" by subtracting the vector M = [m_1, m_2, ..., m_q] of minimum values. Let N = V-M be the normalized vector and R = U-M be the vector of ranges. Note that n_i < r_i. I will change your problem to set the least significant position to be position 1 just for ease of notation. Then position of V in the list of arrangements is given by the sum: S = n_1 + n_2*r_1+n3*r_1*r_2 + ...n_q * r_1*r_2*...*r_q-1 This is a bit like expressing a number in a "variable" base. The number of "digits" available at position i is r_i. Mircea
 Dijkstra Calin Negru13-Dec-22 7:46 Calin Negru 13-Dec-22 7:46
 Re: Dijkstra jschell13-Dec-22 10:39 jschell 13-Dec-22 10:39
 Re: Dijkstra Calin Negru13-Dec-22 22:34 Calin Negru 13-Dec-22 22:34
 Re: Dijkstra jschell20-Dec-22 13:21 jschell 20-Dec-22 13:21
 Re: Dijkstra Calin Negru26-Dec-22 9:26 Calin Negru 26-Dec-22 9:26
 Re: Dijkstra jschell29-Dec-22 11:20 jschell 29-Dec-22 11:20
 Re: Dijkstra Calin Negru30-Dec-22 8:56 Calin Negru 30-Dec-22 8:56
 Re: Dijkstra harold aptroot2-Jan-23 6:45 harold aptroot 2-Jan-23 6:45
 Re: Dijkstra Eddy Vluggen2-Jan-23 10:48 Eddy Vluggen 2-Jan-23 10:48
 Re: Dijkstra Graeme_Grant2-Jan-23 11:41 Graeme_Grant 2-Jan-23 11:41
 Re: Dijkstra Eddy Vluggen2-Jan-23 11:59 Eddy Vluggen 2-Jan-23 11:59
 Re: Dijkstra Graeme_Grant2-Jan-23 12:16 Graeme_Grant 2-Jan-23 12:16
 Re: Dijkstra Eddy Vluggen2-Jan-23 12:27 Eddy Vluggen 2-Jan-23 12:27
 Re: Dijkstra Calin Negru3-Jan-23 0:19 Calin Negru 3-Jan-23 0:19
 Re: Dijkstra Eddy Vluggen3-Jan-23 0:25 Eddy Vluggen 3-Jan-23 0:25
 Re: Dijkstra Calin Negru3-Jan-23 3:37 Calin Negru 3-Jan-23 3:37
 Re: Dijkstra Calin Negru14-Jan-23 8:47 Calin Negru 14-Jan-23 8:47
 Last Visit: 31-Dec-99 18:00     Last Update: 10-Aug-24 17:09 Refresh ᐊ Prev1234567891011 Next ᐅ