votca 2024.2-dev
|
Connects to vertices. More...
#include <edge.h>
Public Member Functions | |
Edge ()=default | |
virtual | ~Edge ()=default |
Edge (Index ID1, Index ID2) | |
Index | getOtherEndPoint (Index ver) const |
Given one of the integers in the edge the other will be output. | |
Index | getEndPoint1 () const |
grab the smaller integer | |
Index | getEndPoint2 () const |
grab the larger integer | |
bool | loop () const |
Checks to see if an edge loops back on itself. | |
bool | contains (Index ID) const |
Determine if the edge contains the Index ID. | |
virtual bool | operator== (const Edge &ed) const |
Checks if Edges are equivalent. | |
virtual bool | operator!= (const Edge &ed) const |
Checks if Edges are not equivalent. | |
virtual bool | operator< (const Edge &ed) const |
virtual bool | operator> (const Edge &ed) const |
virtual bool | operator<= (const Edge &ed) const |
virtual bool | operator>= (const Edge &ed) const |
Protected Attributes | |
std::vector< Index > | vertices_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Edge &ed) |
Print the contents of the edge. | |
Connects to vertices.
The edge class stores the ids of two seperate vertices indictating that they are connected (id1,id2). Unlike a pair the vertex with the lower value is always placed in id1, this allows us to reduce ambiguity when dealing with a link.
|
default |
|
virtualdefault |
bool votca::tools::Edge::contains | ( | Index | ID | ) | const |
|
inline |
|
inline |
|
inline |
|
virtual |
Checks if Edges are not equivalent.
Reimplemented in votca::tools::ReducedEdge.
|
virtual |
If the vertices are smaller in value Edge ed1(2,3); Edge ed2(1,5); Edge ed3(4,1); priority is given to the smallest vertex assert(ed2<ed1); // will return true assert(ed3<ed1); // will return true assert(ed3<ed1); // will return true
Reimplemented in votca::tools::ReducedEdge.
|
virtual |
Reimplemented in votca::tools::ReducedEdge.
|
virtual |
Checks if Edges are equivalent.
Reimplemented in votca::tools::ReducedEdge.
|
virtual |
Reimplemented in votca::tools::ReducedEdge.
|
virtual |
Reimplemented in votca::tools::ReducedEdge.
|
friend |