Click here to Skip to main content
15,905,420 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Daniel Pfeffer29-Jul-18 20:42
professionalDaniel Pfeffer29-Jul-18 20:42 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Richard MacCutchan29-Jul-18 21:26
mveRichard MacCutchan29-Jul-18 21:26 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Chris Losinger30-Jul-18 8:32
professionalChris Losinger30-Jul-18 8:32 
QuestionRead text from a file and realloc when needed Pin
claymorehack6-Jul-18 4:02
claymorehack6-Jul-18 4:02 
AnswerRe: Read text from a file and realloc when needed Pin
Richard MacCutchan6-Jul-18 4:08
mveRichard MacCutchan6-Jul-18 4:08 
GeneralRe: Read text from a file and realloc when needed Pin
claymorehack7-Jul-18 22:46
claymorehack7-Jul-18 22:46 
GeneralRe: Read text from a file and realloc when needed Pin
Richard MacCutchan8-Jul-18 2:49
mveRichard MacCutchan8-Jul-18 2:49 
QuestionLookup table with angles Pin
cristiapi6-Jul-18 2:30
cristiapi6-Jul-18 2:30 
I have a table with 2 columns; here’s two typical examples:
   TABLE 1           TABLE 2
  X       Y         X       Y
-46.3    16.0     -50.3    71.2     
-40.1   -28.1     -43.6   117.7
-34.0  -154.0     -36.9   165.7
-27.8  -171.8     -30.2   176.9
-21.6   178.0     -23.5  -179.2
-15.4   166.2     -16.8  -173.3
 -9.3   120.1     -10.1  -149.3
 -3.1    -2.0      -3.4   -86.2
  3.1   -28.6       3.4   -67.0
  9.3   -80.7      10.1   -72.8
 15.4  -147.7      16.8   -93.5
 21.6  -175.5      23.5  -151.7
 27.8   162.6      30.2   112.9
 34.0   120.2      36.9    80.4
 40.1    49.4      43.6    67.7
 46.3    15.4      50.3    71.4

In the table 1, the Y decreases, while in the table 2 the Y increases. But notice the ambiguity in the table 1 for Y= 150 and in the table 2 for Y= 70.
I generate one table at runtime (I plan to use from 20 to 50 rows), the column Y is an angle (I use radians from –pi to pi and double precision number, but here I used degrees for the sake of simplicity).
The program generates an angle from –pi to pi and I need to find the two X’s that bracket the angle. For example, if the angle is 150, for the table 1 the function should find [-15.4, -9.3] and [27.8, 34.0].
AnswerRe: Lookup table with angles Pin
Stefan_Lang5-Aug-18 23:09
Stefan_Lang5-Aug-18 23:09 
QuestionBig-O Notation Pin
Manish16927-Jun-18 18:31
Manish16927-Jun-18 18:31 
AnswerRe: Big-O Notation Pin
Richard Andrew x648-Jul-18 3:33
professionalRichard Andrew x648-Jul-18 3:33 
QuestionTime complexity Pin
Manish16927-Jun-18 1:42
Manish16927-Jun-18 1:42 
AnswerRe: Time complexity Pin
Richard MacCutchan27-Jun-18 2:28
mveRichard MacCutchan27-Jun-18 2:28 
GeneralRe: Time complexity Pin
Manish16927-Jun-18 17:24
Manish16927-Jun-18 17:24 
GeneralRe: Time complexity Pin
Richard Deeming28-Jun-18 0:54
mveRichard Deeming28-Jun-18 0:54 
GeneralRe: Time complexity Pin
Richard MacCutchan28-Jun-18 0:58
mveRichard MacCutchan28-Jun-18 0:58 
GeneralRe: Time complexity Pin
Richard Deeming28-Jun-18 1:08
mveRichard Deeming28-Jun-18 1:08 
GeneralRe: Time complexity Pin
Richard MacCutchan28-Jun-18 1:20
mveRichard MacCutchan28-Jun-18 1:20 
AnswerRe: Time complexity Pin
Gerry Schmitz27-Jun-18 9:55
mveGerry Schmitz27-Jun-18 9:55 
GeneralRe: Time complexity Pin
Manish16927-Jun-18 17:25
Manish16927-Jun-18 17:25 
GeneralRe: Time complexity Pin
Gerry Schmitz27-Jun-18 19:16
mveGerry Schmitz27-Jun-18 19:16 
GeneralRe: Time complexity Pin
Peter_in_278027-Jun-18 18:19
professionalPeter_in_278027-Jun-18 18:19 
QuestionWhich algorithm or a solution should I use here? Pin
Member 1387019212-Jun-18 13:06
Member 1387019212-Jun-18 13:06 
AnswerRe: Which algorithm or a solution should I use here? Pin
Gerry Schmitz14-Jun-18 7:36
mveGerry Schmitz14-Jun-18 7:36 
AnswerRe: Which algorithm or a solution should I use here? Pin
Eddy Vluggen14-Jun-18 8:02
professionalEddy Vluggen14-Jun-18 8:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.