Click here to Skip to main content
15,892,517 members
Home / Discussions / Algorithms
   

Algorithms

 
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 
AnswerRe: Lookup table with angles Pin
Stefan_Lang5-Aug-18 23:09
Stefan_Lang5-Aug-18 23:09 
If you wonder why no one answers your question, it may be because of the confusing way you are describing your problem:
Member 3648633 wrote:
In the table 1, the Y decreases, while in the table 2 the Y increases.

No! In both tables, X increases, but Y does not strictly increase or decrease over the full range.
Member 3648633 wrote:
But notice the ambiguity in the table 1 for Y= 150 and in the table 2 for Y= 70.

Ambiguity of what? What are you talking about?

Member 3648633 wrote:
the column Y is an angle (I use radians from –pi to pi

That would be the interval [-3.1415, +3.1415]. Your values are much greater than that! If these are angles, your values are in degrees, not radians!
Member 3648633 wrote:
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].

Well, finally! Why didn't you start your posting with that simple description of the task? It all makes more sense now. Moreover, there's no 'ambiguity' - there are simply multiple solutions to your problem.

Now there's only one thing left to do: pose a question. I didn't find any.

P.S.: Since you didn't pose a question, I have one for you: What should the program return for an angle input of 179 degrees? That is a possible input after all...
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

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 
AnswerRe: Which algorithm or a solution should I use here? Pin
Patrice T1-Sep-18 15:56
mvePatrice T1-Sep-18 15:56 

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.