Commit 85bd4bcb authored by Alexis Lebis's avatar Alexis Lebis

add doc + fix rand overflow

parent 88146714
......@@ -248,7 +248,7 @@ int CSDVP::CSDVP_COUNTER = 0;
std::vector<Course> tmpCourses;
for(int i = 0; i < pb._quantityAvailableCourses; i++)
{
tmpCourses.push_back(Course::build(CSDVP::_randomizeIn(pb.cfg_ectsMin(), pb.cfg_ectsMax()+1)));
tmpCourses.push_back(Course::build(CSDVP::_randomizeIn(pb.cfg_ectsMin(), pb.cfg_ectsMax())));
}
/* We obtain how many courses n by semester s
......
......@@ -78,6 +78,7 @@ class CSDVP
static double _randomizeIn(const double min, const double max);
// --------- END GENERATION RELATED FUNCTION ---------
/// It sources _coursesSortedByTF, which is another view of _availableCourses, sorted by TF
void _makeCoursesSortedByTF();
public:
......@@ -95,7 +96,9 @@ class CSDVP
// === CONSTRUCTOR
CSDVP();
/// Generate an instance of the CSDVP iff isConfig is true. Thus, seed != -1;
/**Generate an instance of the CSDVP iff isConfig is true. Thus, seed != -1;
* @developper each kind of generation must sources correctly the main arrays (_availableCours/comp) TF and _sortedCoursesByTF
*/
static void generateProblem(CSDVP & csdvp, CSDVP::GenerationType type, int seed= -1 );
// === GETTER
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment