XX CMake Package
Loading...
Searching...
No Matches
XX::Graph::Edge Class Reference

an edge in a graph More...

#include <XXGraphEdge.h>

Detailed Description

an edge in a graph

an edge can be directed or undirected, depending on the weights

Public Member Functions

 Edge (Vertex *vertexA=nullptr, Vertex *vertexB=nullptr, const double &weightForward=1.0, const double &weightBackward=Edge::invalidWeight)
virtual double getForwardWeight () const
virtual double getBackwardWeight () const
bool hasForwardLink () const
bool hasBackwardLink () const
bool linksVertex (const Vertex *vertex) const
const VertexgetVertexA () const
const VertexgetVertexB () const

Static Public Attributes

static const double invalidWeight

Protected Attributes

VertexvertexA
VertexvertexB
double weightForward
double weightBackward

Friends

class Graph

Constructor & Destructor Documentation

◆ Edge()

XX::Graph::Edge::Edge ( Vertex * vertexA = nullptr,
Vertex * vertexB = nullptr,
const double & weightForward = 1.0,
const double & weightBackward = Edge::invalidWeight )

Member Function Documentation

◆ getBackwardWeight()

virtual double XX::Graph::Edge::getBackwardWeight ( ) const
virtual

◆ getForwardWeight()

virtual double XX::Graph::Edge::getForwardWeight ( ) const
virtual

◆ getVertexA()

const Vertex * XX::Graph::Edge::getVertexA ( ) const

◆ getVertexB()

const Vertex * XX::Graph::Edge::getVertexB ( ) const

◆ hasBackwardLink()

bool XX::Graph::Edge::hasBackwardLink ( ) const

◆ hasForwardLink()

bool XX::Graph::Edge::hasForwardLink ( ) const

◆ linksVertex()

bool XX::Graph::Edge::linksVertex ( const Vertex * vertex) const

◆ Graph

friend class Graph
friend

Member Data Documentation

◆ invalidWeight

const double XX::Graph::Edge::invalidWeight
static

◆ vertexA

Vertex* XX::Graph::Edge::vertexA
protected

◆ vertexB

Vertex* XX::Graph::Edge::vertexB
protected

◆ weightBackward

double XX::Graph::Edge::weightBackward
protected

◆ weightForward

double XX::Graph::Edge::weightForward
protected

The documentation for this class was generated from the following file: