Public Member Functions | Public Attributes | List of all members
edge Class Reference

A class for representing edges. More...

#include <edge.h>

Public Member Functions

 edge (int f, int t, int c, bool v=false)
 Constructor that initializes the private member variables. More...
 
bool operator== (const edge &e) const
 Compare this edge to another one. More...
 

Public Attributes

int cost
 The cost of the edge, i.e., length. More...
 
int from
 The starting vertex of the edge. More...
 
int to
 The ending vertex of the edge. More...
 
bool vertical
 Whether the sweeping pattern is vertical or horizontal. More...
 

Detailed Description

A class for representing edges.

Definition at line 9 of file edge.h.

Constructor & Destructor Documentation

edge::edge ( int  f,
int  t,
int  c,
bool  v = false 
)

Constructor that initializes the private member variables.

Parameters
fThe starting vertex.
tThe ending vertex.
cThe cost of the edge.
vWhether the sweeping pattern is vertical or horizontal. Default horizontal.

Definition at line 3 of file edge.cpp.

Member Function Documentation

bool edge::operator== ( const edge e) const

Compare this edge to another one.

Parameters
eThe other edge to compare.
Returns
True, of both edges are identical, false otherwise.

Definition at line 7 of file edge.cpp.

Member Data Documentation

int edge::cost

The cost of the edge, i.e., length.

Definition at line 41 of file edge.h.

int edge::from

The starting vertex of the edge.

Definition at line 31 of file edge.h.

int edge::to

The ending vertex of the edge.

Definition at line 36 of file edge.h.

bool edge::vertical

Whether the sweeping pattern is vertical or horizontal.

Definition at line 46 of file edge.h.


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


coverage_path
Author(s): Micha Sende
autogenerated on Tue Jan 19 2021 03:30:03