Programmatically generate decision table in C#?

后端 未结 5 2018
旧时难觅i
旧时难觅i 2021-01-06 23:47

I have this situation that I need to let users define decisions based on the number of given conditions. For example my program needs to automatically generate a matrix as b

5条回答
  •  旧时难觅i
    2021-01-06 23:55

    I'm not sure what you mean, but maybe this is what you are looking for:

    I made some little adjustments, because your second example wasn't consistent with the first one; and negated the bits (I substituted F with 0, and T with 1), to show my point.

    Condition A   0 0 0 0 1 1 1 1
    Condition B   0 0 1 1 0 0 1 1
    Condition C   0 1 0 1 0 1 0 1
    

    Now, observe the pattern of each column, and think about binary numbers ;).

    (I hope you get the idea.)

提交回复
热议问题