LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::Node Class Reference

A node of the model: the index it was given, and the model that owns it. More...

#include <line/lang/qn/nodes.h>

Inheritance diagram for line::Node:
Collaboration diagram for line::Node:

Public Member Functions

std::size_t get_index () const
 get_index(): the 1-based node index the builder assigned.
const std::string & get_name () const
 getName().
NetworkModelmodel () const
 The model this node belongs to.
 operator std::size_t () const
 A handle IS its index wherever one is expected.
void set_routing (std::size_t cls, lang::RoutingStrategy rs)
 setRouting(class, strategy).
void set_routing_weights (std::size_t cls, const std::map< std::size_t, double > &weights)
 setRoutingWeight(class, weights): the WRROBIN share per destination.

Protected Member Functions

 Node (NetworkModel &m, std::size_t idx, const std::string &nm)

Protected Attributes

NetworkModelmodel_
std::size_t idx_
std::string name_

Detailed Description

A node of the model: the index it was given, and the model that owns it.

Definition at line 56 of file nodes.h.

Constructor & Destructor Documentation

◆ Node()

line::Node::Node ( NetworkModel & m,
std::size_t idx,
const std::string & nm )
inlineprotected

Member Function Documentation

◆ get_index()

std::size_t line::Node::get_index ( ) const
inline

get_index(): the 1-based node index the builder assigned.

Definition at line 59 of file nodes.h.

References idx_.

◆ get_name()

const std::string & line::Node::get_name ( ) const
inline

getName().

Definition at line 61 of file nodes.h.

References name_.

◆ model()

NetworkModel & line::Node::model ( ) const
inline

The model this node belongs to.

Definition at line 63 of file nodes.h.

References model_.

◆ operator std::size_t()

line::Node::operator std::size_t ( ) const
inline

A handle IS its index wherever one is expected.

This is what lets P.set(closed, closed, delay, queue1, 1.0) take handles, and what lets a half-migrated example keep compiling.

Definition at line 71 of file nodes.h.

References idx_.

◆ set_routing()

void line::Node::set_routing ( std::size_t cls,
lang::RoutingStrategy rs )
inline

setRouting(class, strategy).

Definition at line 74 of file nodes.h.

References idx_, model_, and line::qn::Network< T >::set_routing().

◆ set_routing_weights()

void line::Node::set_routing_weights ( std::size_t cls,
const std::map< std::size_t, double > & weights )
inline

setRoutingWeight(class, weights): the WRROBIN share per destination.

Definition at line 78 of file nodes.h.

References idx_, model_, and line::qn::Network< T >::set_routing_weights().

Member Data Documentation

◆ idx_

◆ model_

◆ name_

std::string line::Node::name_
protected

Definition at line 87 of file nodes.h.

Referenced by get_name(), and Node().


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