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

Flat index of the joint variable p2(j,nj,k,i,ni,h). More...

#include <line/api/mapqn/mapqn_params.h>

Collaboration diagram for line::mapqn::P2Index:

Public Member Functions

 P2Index ()
 P2Index (int m, int n, const std::vector< int > &k)
std::size_t half (int i, int ni, int h) const
 Half-index of (queue, population, phase); identical for both halves.
std::size_t operator() (int j, int nj, int k, int i, int ni, int h) const
std::size_t num_vars () const

Public Attributes

int M = 0
int N = 0
std::vector< int > K
std::vector< int > cumK
 cumK[i] = sum_{i' < i} K(i')
std::size_t block = 0
 (N+1) * sum_i K(i)

Detailed Description

Flat index of the joint variable p2(j,nj,k,i,ni,h).

The enumeration order is the one mapqn_bnd_qr_ld.m builds: for j, for nj = 0..N, for k = 1..K(j), for i, for ni = 0..N, for h = 1..K(i) which factorizes as outer(j,nj,k) * B + inner(i,ni,h) with the same map used for both halves and B = (N+1) * sum_i K(i). Keeping the two halves identical is what makes the SYMMETRY family a plain index swap.

Definition at line 113 of file mapqn_params.h.

Constructor & Destructor Documentation

◆ P2Index() [1/2]

line::mapqn::P2Index::P2Index ( )
inline

Definition at line 119 of file mapqn_params.h.

◆ P2Index() [2/2]

line::mapqn::P2Index::P2Index ( int m,
int n,
const std::vector< int > & k )
inline

Definition at line 120 of file mapqn_params.h.

References block, cumK, K, M, and N.

Member Function Documentation

◆ half()

std::size_t line::mapqn::P2Index::half ( int i,
int ni,
int h ) const
inline

Half-index of (queue, population, phase); identical for both halves.

Definition at line 127 of file mapqn_params.h.

References cumK, K, and N.

Referenced by operator()().

◆ num_vars()

std::size_t line::mapqn::P2Index::num_vars ( ) const
inline

◆ operator()()

std::size_t line::mapqn::P2Index::operator() ( int j,
int nj,
int k,
int i,
int ni,
int h ) const
inline

Definition at line 133 of file mapqn_params.h.

References block, and half().

Member Data Documentation

◆ block

std::size_t line::mapqn::P2Index::block = 0

(N+1) * sum_i K(i)

Definition at line 117 of file mapqn_params.h.

Referenced by num_vars(), operator()(), and P2Index().

◆ cumK

std::vector<int> line::mapqn::P2Index::cumK

cumK[i] = sum_{i' < i} K(i')

Definition at line 116 of file mapqn_params.h.

Referenced by half(), and P2Index().

◆ K

std::vector<int> line::mapqn::P2Index::K

Definition at line 115 of file mapqn_params.h.

Referenced by half(), and P2Index().

◆ M

int line::mapqn::P2Index::M = 0

Definition at line 114 of file mapqn_params.h.

Referenced by P2Index().

◆ N

int line::mapqn::P2Index::N = 0

Definition at line 114 of file mapqn_params.h.

Referenced by half(), and P2Index().


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