// given a set of numbers, a goal, a bound, and a number of iterations,
// will attempt to determine if within the number of iterations some subset
// of the set of numbers totals to the goal given within the bound given

#include "bool.h"
#include "numvec.h"

struct resultNode {
  int index;
  int value;
};

class RandomSum {
  public:
    RandomSum(NumVec * set, int goal, int bound, int iterations);
    ~RandomSum();
    boolean Solve(void);
    int GetSize(void);
    boolean ValueAt(int location);
    int GetTotal(void);
  private:
    resultNode * result;
    boolean * resultFlags;
    int size;
    int goal;
    int bound;
    int iterations;
    int total;
};











