How to determine best possible combination to a C# ListArray?
-
Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble
-
Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble
Just looking for the logic, and not the code.
-
Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble
humblepgmr wrote:
So if I've got an array list of MyObjects_;
What's the deal with the underscore?
humblepgmr wrote:
There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1);
What do you mean by "type" in this case?
humblepgmr wrote:
What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)?
Could you specify in what way any combination would be more accurate than any other?
--- single minded; short sighted; long gone;
-
Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble
- How does an input value of 21 fit into a context of an array list containing 4 different types, none of which are 21? 2) What is an "accurate combination of objects"? 3) What is now i in the "obj[i] == input_" part? And index I guess... but of what? 4) What is that trailing underscore doing everywhere (not relevant for your question as such I guess, just wondering).