1

I am going to ask a question, but I am not sure if it will been closed shortly afterwards.

Can you give me a hint if Stack Overflow is the right place for this question and how can I make my question less broad?

I want to check group of algorithms which has up to 8 input options. The naive idea would be to check all possibilities via brute force. How can I reduce it without leaving out required combinations?

Since I do not know it better I'm using multiple loops which ends in worst case in a O(n8) complexity.

To give a hint what that inputs are:

  • Data point count (by default 28 but can be 14-70 or anything else > 5)
  • Date (s relative day index based on the data points)
  • Preferences (limited to 3)
  • Temperature (limited to 34-38°C in 0.05 steps)
  • A marker on a day (limited to the possible values from the data points)

I have multiple algorithms which have all the same interface, but some concrete algorithm just uses some fields and not all. However should I need to check those other cases too since the algorithm might been updated and the test was forgotten for some reasons?

Do you have some best practices how to check algorithm?

5
  • 1
    Do you have some best practices - sounds like it may be a good one for Software Engineering
    – theB
    Commented Oct 19, 2015 at 9:52
  • Your question is pretty hard to understand. Maybe a toy example or concrete use-case would help. Especially unclear is what relates these algorithms/why they're bunched like that and how you could test all of them with the same code.
    – Mat
    Commented Oct 19, 2015 at 10:56
  • 2
    @theB Sounds Too Broad for Programmers.
    – Servy
    Commented Feb 22, 2016 at 15:19
  • This question (i.e. on Meta) is primarily opinion based. ;) Commented Feb 22, 2016 at 15:34
  • 1
    BTW, I think you mean "[t]he naive idea" rather than "the native idea" in that second sentence... Commented Feb 22, 2016 at 17:07

1 Answer 1

3

I doubt this question will fly in Stack Overflow, it is too broad, if not unclear.

To make it work on Stack Overflow you'll need to provide a start of an implementation where you then can point out that you run into problems when you extend this to your real use-case.

One other option could be Programmers.SE but I think you need to reduce the question to a design problem. In this form it's more soliciting for opinions. I'm not an active member of programmers.SE so before posting read their help or re-ask this question on their meta.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .