Click here to Skip to main content
15,893,722 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Best Fit Algo. Pin
Tadeusz Westawic12-Jun-08 18:41
Tadeusz Westawic12-Jun-08 18:41 
QuestionCollision Detection Pin
AliN13626-Jun-08 5:36
AliN13626-Jun-08 5:36 
AnswerRe: Collision Detection [modified] PinPopular
73Zeppelin6-Jun-08 6:47
73Zeppelin6-Jun-08 6:47 
AnswerRe: Collision Detection Pin
Arash Partow6-Jun-08 10:59
Arash Partow6-Jun-08 10:59 
AnswerRe: Collision Detection Pin
Mark Churchill9-Jun-08 18:43
Mark Churchill9-Jun-08 18:43 
AnswerRe: Collision Detection Pin
Tadeusz Westawic12-Jun-08 20:00
Tadeusz Westawic12-Jun-08 20:00 
GeneralRe: Collision Detection Pin
Tadeusz Westawic13-Jun-08 3:35
Tadeusz Westawic13-Jun-08 3:35 
QuestionMultidimensional Logic? Pin
Leslie Sanford5-Jun-08 7:23
Leslie Sanford5-Jun-08 7:23 
This is one of those times when I'm not sure I understand the problem well enough to articulate an intelligeable question, so bear with me as I muddle my way through this.

In my application, I have a set of conditions. I need to test these conditions, and if a combination of them results in a true value, then I take one action; otherwise, I take another.

These conditions are really just integer values; the test in my code looks something like this:

flag1 = flag2 = flag3 = false;
 
for(int i = 0; i < OscillatorCount; i++)
{
    for(int j = 0; j < TargetCount; j++)
    {
        if(oscillatorSource[i][j] == Envelope1)
        {
            flag1 = true;
        }
        else if(oscillatorSource[i][j] == Envelope2)
        {
            flag2 = true;
        }
        else if(oscillatorSource[i][j] == Envelope3)
        {
            flag3 = true;
        }
    }
}


In other words, I have a two-dimensional table. If any of the values in the table matches a certain value, I set a flag to true. So in the future when I need to take an action based on the values in the table, I can simply do this:

if(flag1)
{
    // Do something...
}
 
if(flag2)
{
    // Do something...
}
 
if(flag3)
{
    // Do something...
}


What it seems like I'm doing is answering questions about a two-dimensional table and putting the answers into one-dimensional values, i.e. the boolean flags.

Are there algorithms for this sort of thing?
AnswerRe: Multidimensional Logic? Pin
PIEBALDconsult5-Jun-08 8:12
mvePIEBALDconsult5-Jun-08 8:12 
QuestionMercator distance Pin
michela4-Jun-08 22:12
michela4-Jun-08 22:12 
AnswerRe: Mercator distance Pin
Arash Partow5-Jun-08 1:41
Arash Partow5-Jun-08 1:41 
AnswerRe: Mercator distance Pin
73Zeppelin5-Jun-08 4:54
73Zeppelin5-Jun-08 4:54 
GeneralRe: Mercator distance Pin
MarkB7775-Jun-08 22:05
MarkB7775-Jun-08 22:05 
GeneralRe: Mercator distance Pin
michela6-Jun-08 0:59
michela6-Jun-08 0:59 
GeneralRe: Mercator distance [modified] Pin
73Zeppelin6-Jun-08 2:22
73Zeppelin6-Jun-08 2:22 
GeneralRe: Mercator distance Pin
michela6-Jun-08 2:56
michela6-Jun-08 2:56 
GeneralRe: Mercator distance Pin
73Zeppelin6-Jun-08 3:27
73Zeppelin6-Jun-08 3:27 
QuestionWorth its Salt? Pin
Brady Kelly3-Jun-08 4:48
Brady Kelly3-Jun-08 4:48 
AnswerRe: Worth its Salt? Pin
Arash Partow3-Jun-08 8:21
Arash Partow3-Jun-08 8:21 
GeneralRe: Worth its Salt? Pin
Brady Kelly3-Jun-08 22:34
Brady Kelly3-Jun-08 22:34 
QuestionAuto Update Algorithm Pin
Richard Andrew x6431-May-08 14:19
professionalRichard Andrew x6431-May-08 14:19 
AnswerRe: Auto Update Algorithm Pin
Nelek1-Jun-08 5:37
protectorNelek1-Jun-08 5:37 
QuestionSimple shape recognition Pin
Jim Crafton30-May-08 9:20
Jim Crafton30-May-08 9:20 
AnswerRe: Simple shape recognition Pin
Matthew Butler30-May-08 10:08
Matthew Butler30-May-08 10:08 
GeneralRe: Simple shape recognition Pin
Jim Crafton30-May-08 10:19
Jim Crafton30-May-08 10:19 

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.