mmCEsim 0.3.0
mmWave Channel Estimation Simulation
Channel_Graph Class Reference

#include <channel_graph.h>

Public Member Functions

bool addChannel (const std::string &id, const std::string &from, const std::string &to)
 Add channel from configuration to the channel graph. More...
 
size_t nodeIndex (const std::string &id) const
 
size_t channelIndex (const std::string &id) const
 
size_t chFromIndex (const std::string &id) const
 Get the 'from' node index of channel. More...
 
size_t chToIndex (const std::string &id) const
 Get the 'to' node index of channel. More...
 
size_t pathsNum () const noexcept
 The number of paths in the channel graph. More...
 
size_t maxPathLength () const
 
bool arrange ()
 

Public Attributes

std::vector< std::string > nodes
 
std::vector< std::string > channels
 
std::vector< size_t > from
 
std::vector< size_t > to
 
std::vector< size_t > Tx
 
std::vector< size_t > Rx
 
std::vector< std::vector< size_t > > paths
 
std::vector< size_t > paths_num_acc
 
std::vector< std::pair< size_t, size_t > > paths_indices
 

Static Public Attributes

static constexpr const size_t MAX_INDEX = -1
 

Private Member Functions

void _formPaths (const std::vector< size_t > &path)
 Form paths based on the current frontier. More...
 
void _sortPaths ()
 Sort paths. More...
 
void _validatePaths ()
 Validate paths. More...
 

Member Function Documentation

◆ _formPaths()

void Channel_Graph::_formPaths ( const std::vector< size_t > &  path)
private

Form paths based on the current frontier.

Parameters
pathThe current path.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _sortPaths()

void Channel_Graph::_sortPaths ( )
private

Sort paths.

This sorts the paths based on the jumps (sizes) of the paths (from short to long).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _validatePaths()

void Channel_Graph::_validatePaths ( )
private

Validate paths.

This removes all paths that does not terminate in the Rx.

Deprecated:
This is not used anymore since everything is handled well in _formPaths now.
Here is the call graph for this function:

◆ addChannel()

bool Channel_Graph::addChannel ( const std::string &  id,
const std::string &  from,
const std::string &  to 
)

Add channel from configuration to the channel graph.

Parameters
idThe channel id.
fromThe from node of the channel.
toThe to mode of the channel.
Return values
trueThe channel is successfully added.
falseThere channel fails to be added correctly.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ arrange()

bool Channel_Graph::arrange ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ channelIndex()

size_t Channel_Graph::channelIndex ( const std::string &  id) const
Here is the caller graph for this function:

◆ chFromIndex()

size_t Channel_Graph::chFromIndex ( const std::string &  id) const
inline

Get the 'from' node index of channel.

Parameters
idThe channel id
Returns
(size_t) the node index
Here is the call graph for this function:

◆ chToIndex()

size_t Channel_Graph::chToIndex ( const std::string &  id) const
inline

Get the 'to' node index of channel.

Parameters
idThe channel id
Returns
(size_t) the node index
Here is the call graph for this function:

◆ maxPathLength()

size_t Channel_Graph::maxPathLength ( ) const
inline

◆ nodeIndex()

size_t Channel_Graph::nodeIndex ( const std::string &  id) const
Here is the caller graph for this function:

◆ pathsNum()

size_t Channel_Graph::pathsNum ( ) const
inlinenoexcept

The number of paths in the channel graph.

Returns
(size_t) the number of paths
Here is the caller graph for this function:

Member Data Documentation

◆ channels

std::vector<std::string> Channel_Graph::channels

◆ from

std::vector<size_t> Channel_Graph::from

◆ MAX_INDEX

constexpr const size_t Channel_Graph::MAX_INDEX = -1
staticconstexpr

◆ nodes

std::vector<std::string> Channel_Graph::nodes

◆ paths

std::vector<std::vector<size_t> > Channel_Graph::paths

each path are stored as channel indices

◆ paths_indices

std::vector<std::pair<size_t, size_t> > Channel_Graph::paths_indices

map 1D index to 2D used in paths

◆ paths_num_acc

std::vector<size_t> Channel_Graph::paths_num_acc

◆ Rx

std::vector<size_t> Channel_Graph::Rx

◆ to

std::vector<size_t> Channel_Graph::to

◆ Tx

std::vector<size_t> Channel_Graph::Tx

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