Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of combination problem
Message
From
02/09/1999 09:18:51
 
 
To
02/09/1999 08:57:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00260337
Message ID:
00260551
Views:
15
What I would do is "cheat" by starting with the ending value, tracing backwards until I had all the record combinations that ended with a end_field value, and then delete all the paths that did not start with my beginning path.

ie
I want to go from a to c
ceba
cba

The just reverse the path. If there were any paths that didn't end in a, I would drop them.

What use is the condition field?

What are you trying to do? I mean, maybe with a little more background on the project, we could pitch in with more help...
BTW--If you need to place formatted text in a message, use the PRE and /PRE tags to make the columns line up better, look at the way the data appears in my quoted part below:


>By path I mean the number of ways to get to 'D' from 'A'
>the value of the end_field always follows the value of the start_field in sequence.
>
>
>
>start_field  end_field  condition_field
>A              B         .T.
>B              C         cond2
>B              D         cond3
>C              D         .T.
>B              E         cond1
>E              C         .T.
>
>For example
>there are only 2 ways to end on 'C' starting from 'A'
>
>With a as your start_field (a to b) [row 1]
>Then with 'b' as the start_field b to c [row 2]
>a->b->c
>
>and
>
>with a as your start_field (a to b) [row 1]
>then with b as your start_field (b to e ) [row 5]
>then with e as your start field (e to c) [row 6]
>a->b->e->c
>
>
>
>However in this example (the table order is irrelevant)
>there are 3 ways to end on 'D' starting from 'A'
>
>
>abcd
>abd
>abecd
>
>I am looking for any suggestions on finding and storing these cobinations programatically.
--Todd Sherman
-Wake Up! Smell the Coffee!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform