The CyMeAlg Software (Release 0.01)
Public Member Functions | Private Attributes | Friends | List of all members
cymealg::diGraph< wType >::posWeight Class Reference

A class for representing a positive number with negative values serving as the infinity (used in the Dijkstra algorithm). More...

Public Member Functions

 posWeight ()
 The default constructor. More...
 
 posWeight (const wType &_value)
 An optional constructor. More...
 
void setInfinity ()
 Sets the value to the infinity. More...
 
bool isInfinity () const
 Returns true iff the value corresponds to the infinity. More...
 
const wType & getValue () const
 Returns the value stored in this object. More...
 

Private Attributes

wType value
 The actual number. More...
 

Friends

bool operator< (const posWeight &x, const posWeight &y)
 The < operator for comparing the numbers. More...
 
std::ostream & operator<< (std::ostream &out, const posWeight &x)
 The operator for showing the number to the output stream. More...
 

Detailed Description

template<class wType = int>
class cymealg::diGraph< wType >::posWeight

A class for representing a positive number with negative values serving as the infinity (used in the Dijkstra algorithm).

Definition at line 384 of file digraph.h.

Constructor & Destructor Documentation

◆ posWeight() [1/2]

template<class wType = int>
cymealg::diGraph< wType >::posWeight::posWeight ( )
inline

The default constructor.

Definition at line 388 of file digraph.h.

◆ posWeight() [2/2]

template<class wType = int>
cymealg::diGraph< wType >::posWeight::posWeight ( const wType &  _value)
inlineexplicit

An optional constructor.

Definition at line 395 of file digraph.h.

Member Function Documentation

◆ getValue()

template<class wType = int>
const wType& cymealg::diGraph< wType >::posWeight::getValue ( ) const
inline

Returns the value stored in this object.

Definition at line 418 of file digraph.h.

◆ isInfinity()

template<class wType = int>
bool cymealg::diGraph< wType >::posWeight::isInfinity ( ) const
inline

Returns true iff the value corresponds to the infinity.

Definition at line 412 of file digraph.h.

◆ setInfinity()

template<class wType = int>
void cymealg::diGraph< wType >::posWeight::setInfinity ( )
inline

Sets the value to the infinity.

Definition at line 405 of file digraph.h.

Friends And Related Function Documentation

◆ operator<

template<class wType = int>
bool operator< ( const posWeight x,
const posWeight y 
)
friend

The < operator for comparing the numbers.

Definition at line 424 of file digraph.h.

◆ operator<<

template<class wType = int>
std::ostream& operator<< ( std::ostream &  out,
const posWeight x 
)
friend

The operator for showing the number to the output stream.

Definition at line 435 of file digraph.h.

Member Data Documentation

◆ value

template<class wType = int>
wType cymealg::diGraph< wType >::posWeight::value
private

The actual number.

Definition at line 447 of file digraph.h.


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