/[ff3d]/ff3d/solver/Edge.hpp
ViewVC logotype

Diff of /ff3d/solver/Edge.hpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by delpinux, Sun Apr 27 16:58:47 2003 UTC revision 1.3 by delpinux, Sun Jun 15 18:36:26 2003 UTC
# Line 24  Line 24 
24  #include <Vertex.hpp>  #include <Vertex.hpp>
25  #include <utility>  #include <utility>
26    
27  /*! \class Edge  /*!
28    This class provides a Edge description.    \class Edge
   A Edge is defined by 2 vertices and a reference.  
29  */  */
30    
31    /**
32     * @file   Edge.hpp
33     * @author Stephane Del Pino
34     * @date   Sun Jun 15 20:15:23 2003
35     *
36     * @brief  This class provides a Edge description.
37     *
38     * This class provides a Edge description.  A Edge is defined by 2
39     * vertices and a reference.
40     *
41     * @todo This class is really hugly should rework it a lot!
42     */
43    
44  class Edge  class Edge
45  {  {
46  public:  public:
# Line 35  public: Line 48  public:
48      NumberOfVertices = 2      NumberOfVertices = 2
49    };    };
50    
51    typedef std::pair<const Vertex*, const Vertex*> Pair;    typedef std::pair<Vertex*, Vertex*> Pair;
52  private:  private:
53    //! An edge is defined by two vertices.    //! An edge is defined by two vertices.
54    Edge::Pair vp;    Edge::Pair vp;
# Line 100  public: Line 113  public:
113    Edge(const Vertex& v1, const Vertex& v2, int r=0)    Edge(const Vertex& v1, const Vertex& v2, int r=0)
114      : ref(r)      : ref(r)
115    {    {
116      const Vertex* V1 = (&v1<&v2) ? &v1 : &v2;      Vertex* V1 = const_cast<Vertex*>((&v1<&v2) ? &v1 : &v2);
117      const Vertex* V2 = (&v1>&v2) ? &v1 : &v2;      Vertex* V2 = const_cast<Vertex*>((&v1>&v2) ? &v1 : &v2);
118      vp = Pair(V1, V2);      vp = Pair(V1, V2);
119    }    }
120    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26