Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Noeud.h"
- Noeud::Noeud()
- {
- }
- Noeud::~Noeud()
- {
- }
- Noeud::Noeud(int k, int c, int t, Noeud *p, Noeud *g, Noeud *d, Noeud* pred, Noeud* succ) {
- this->k = k;
- this->c = c;
- this->t = t;
- this->p = p;
- this->g = g;
- this->d = d;
- this->pred = pred;
- this->succ = succ;
- }
- Noeud::Noeud(int c) {
- this->k = 0;
- this->c = c;
- this->t = 1;
- this->p = NULL;
- this->g = NULL;
- this->d = NULL;
- this->pred = NULL;
- this->succ = NULL;
- }
- void Noeud::setKey(int key) {
- this->k = key;
- }
- void Noeud::setParent(Noeud* n) {
- this->p = n;
- }
- Noeud* Noeud::getParent() {
- return this->p;
- }
- void Noeud::setEnfantGauche(Noeud* n) {
- this->g = n;
- }
- Noeud* Noeud::getEnfantGauche() {
- return this->g;
- }
- void Noeud::setEnfantDroit(Noeud* n) {
- this->d = n;
- }
- Noeud* Noeud::getEnfantDroit() {
- return this->d;
- }
- void Noeud::setPredecesseur(Noeud* n) {
- this->pred = n;
- }
- Noeud* Noeud::getPredecesseur() {
- return this->pred;
- }
- void Noeud::setSuccesseur(Noeud* n) {
- this->succ = n;
- }
- Noeud* Noeud::getSuccesseur() {
- return this->succ;
- }
- void Noeud::setCouleur(int c) {
- this->c = c;
- }
- int Noeud::getCouleur() {
- return this->c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement