edge.h

Go to the documentation of this file.
00001 #ifndef __edge_h
00002 #define __edge_h
00003 
00004 #include <iostream>
00005 #include <utility>
00006 
00007 /***********************************************/
00008 
00009 namespace Gascoigne
00010 {
00011 class Edge
00012 {
00013  protected:
00014 
00015   int c1, c2, l1, l2;  
00016 
00017  public:
00018 
00019   Edge()                { c1=c2=l1=l2=-1;}
00020   Edge(const Edge& e)   { *this=e; }
00021   Edge(int c, int l)    { c1=c,l1=l; c2=l2=-1;}
00022 
00023   int  master()           const { return c1;}
00024   int& master()                 { return c1;}
00025   int  slave ()           const { return c2;}
00026   int& slave ()                 { return c2;}
00027 
00028   int  LocalMasterIndex() const { return l1;}
00029   int& LocalMasterIndex()       { return l1;}
00030   int  LocalSlaveIndex () const { return l2;}
00031   int& LocalSlaveIndex ()       { return l2;}
00032 
00033   Edge& operator=(const Edge& e);
00034 
00035   void swapping(int);
00036   void setmaster(int,int);
00037   std::pair<int,int> EdgeNeighbour(int i) const;
00038 
00039   void BinWrite(std::ostream &s) const;
00040   void BinRead(std::istream &s);
00041 
00042   friend std::ostream& operator<<(std::ostream &s, const Edge& A);
00043   friend std::istream& operator>>(std::istream &s, Edge& A);
00044 };
00045 }
00046 
00047 /***********************************************/
00048 
00049 #endif

Generated on Thu Sep 14 10:34:37 2006 for Gascoigne by  doxygen 1.4.7