www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

Arc.cpp (1246B)


      1 #include "Arc.h"
      2 
      3 Arc::Arc(unsigned int a, unsigned int b, unsigned int c, unsigned int f)
      4 {
      5     this->a = a;
      6     this->b = b;
      7     this->capacite = c;
      8     this->flot = f;
      9 }
     10 
     11 Arc::Arc(const Arc *arc)
     12 {
     13     this->a = arc->a;
     14     this->b = arc->b;
     15     this->capacite = arc->capacite;
     16     this->flot = arc->flot;
     17 }
     18 
     19 void Arc::setS1(unsigned int val)
     20 {
     21     this->a = val;
     22 }
     23 
     24 unsigned int Arc::getS1() const
     25 {
     26     return this->a;
     27 }
     28 
     29 void Arc::setS2(unsigned int val)
     30 {
     31     this->b = val;
     32 }
     33 
     34 unsigned int Arc::getS2() const
     35 {
     36     return this->b;
     37 }
     38 
     39 void Arc::setFlot(unsigned int val)
     40 {
     41     this->flot = val;
     42 }
     43 
     44 unsigned int Arc::getFlot() const
     45 {
     46     return this->flot;
     47 }
     48 
     49 void Arc::setCapacite(unsigned int val)
     50 {
     51     this->capacite = val;
     52 }
     53 
     54 unsigned int Arc::getCapacite() const
     55 {
     56     return this->capacite;
     57 }
     58 
     59 bool Arc::getArcRetour()
     60 {
     61     return this->arcRetour;
     62 }
     63 
     64 void Arc::setArcRetour(bool v)
     65 {
     66     this->arcRetour = v;
     67 }
     68 
     69 void Arc::afficheArc()
     70 {
     71     cout << " " << this->a << "  " << this->b << "     c : "            // Affichage des noms des sommets.
     72         << this->capacite << "    f : " << this->flot << endl;          // Affichage de la capacité et du flot.
     73 }