#include "../includes/Projet.hpp" Projet::Projet(std::vector taches){ taches=taches;} Projet::Projet() {} Projet::~Projet() {} Projet::Projet(const Projet &) {} const Projet &Projet::operator=(const Projet &src) { if (this == &src) { return *this; } return *this; } std::pair Projet::pick_two_random_tasks(){ int size = this->taches.size(); int rand1 = rand() % size; int rand2 = rand() % size; if(this->taches[rand1]->depends_from(*this->taches[rand2])) pick_two_random_tasks(); //Heritage de tache ? int id1 = this->taches[rand1]->unique_id; int id2 = this->taches[rand2]->unique_id; return std::make_pair(id1, id2); } //Comment acceder à unique_id ici ? Tache *Projet::contains(int id){ for(Tache *t:this->taches) if(id==t->unique_id) return t; return nullptr; } //Comment acceder à taches ici ? std::ostream& operator<<(std::ostream &out, Projet &x){ for(Tache *t: x.taches) out << *t; return out; } const std::vector topologicalSort(){ //Recupere le calcul fait par PP_postfixe et construit son tri //PP_postfixe(this->taches); }