Go to the documentation of this file.
21 #include <QtCore/QHash>
42 template <
typename EdgeContent>
class Edge {
109 template <
typename R>
const R&
operator->*(R EdgeContent::*ptr)
const {
211 template <
typename EdgeContent>
219 template <
typename EdgeContent>
221 : _source(copy._source)
222 , _target(copy._target)
223 , _content(copy._content)
227 template <
typename EdgeContent>
260 template <
typename EdgeContent>
struct Arc {
319 operator bool()
const {
return main != 0; }
367 template <
typename EdgeContent>
376 template <
typename EdgeContent>
385 template <
typename EdgeContent>
387 : _source(copy._source)
388 , _target(copy._target)
397 return Arc(_target, _source, other, main);
404 template <
typename EdgeContent>
struct hash<
mgx::Edge<EdgeContent> > {
size_t operator()(const mgx::Edge< EdgeContent > &e) const
EdgeContent * operator->() const
Reference the content of the arc as a pointer.
identity_t target() const
Returns the identifier of the target of the edge.
intptr_t edge_identity_t
Type of the identifier of an edge.
EdgeContent content_t
Type of the content of the edge.
Edge()
Creates a null edge.
identity_t source() const
Returns the identifier of the source of the edge.
EdgeContent & operator*() const
Data access.
EdgeContent * operator->() const
Data access.
bool operator==(const Edge &other) const
Comparison operators.
const R & operator->*(R EdgeContent::*ptr) const
Constant access to the data via pointer to member.
CU_HOST_DEVICE const const T T c2
bool operator!=(const Edge &other) const
Comparison operators.
void clear()
Reset an edge weak pointer to null.
Distributed matrix library.
void copy_symmetric(T &e2, const T &e1)
Default copy of the arc uses the = operator.
R & operator->*(R EdgeContent::*ptr)
Access to the data via pointer to member.
identity_t _source
Identity of the source of the edge.
edge_identity_t identity_t
Type of the identity of a vertex.
bool isNull() const
Test if the content is null.
Edge & operator=(const Edge &other)
Change the reference help by the object.
identity_t source() const
Returns the identifier of the source of the edge.
Edge< EdgeContent > edge_t
identity_t _target
Identity of the target of the edge.
CU_HOST_DEVICE const const T c1
edge_identity_t identity_t
Type of the identity of a vertex.
Arc inv() const
Synchronize the edges and returns the opposite arc.
Arc operator-() const
Unary '-' operator synchronize edges and returns opposite arc.
Arc()
Cosntruct an empty (null) arc.
~Arc()
Destroy and copy the content of the arcs.
bool isNull() const
Test if an edge is null.
EdgeContent * _content
Content of the edge.
void sync() const
Synchronize both sides of the arc.
identity_t target() const
Returns the identifier of the target of the edge.
EdgeContent & operator*() const
Reference the content of the arc.
EdgeContent * pointer
Type of the equivalent pointer.
bool operator<(const Edge &other) const
Comparison operators.
uint qHash(const mgx::Edge< EdgeContent > &e)
Type of a undirected edge (or arc)
bool operator>(const Edge &other) const
Comparison operators.