TMB Documentation
v1.9.11
|
Utilility class for sequential_reduction
.
More...
#include <graph_transform.hpp>
Public Member Functions | |
void | get_stride (const clique &super, Index ind, std::vector< ad_plain > &offset, Index &stride) |
Determine array offsets and stride of this clique. More... | |
Public Attributes | |
std::vector< size_t > | dim |
Dimension of logsum array. | |
std::vector< Index > | indices |
Variable indices of this clique. | |
std::vector< ad_aug > | logsum |
Log-probabilites of this clique. | |
Utilility class for sequential_reduction
.
Class to represent a clique, i.e. a small set of variables for which the joint probability must be fully tabulated.
Definition at line 480 of file graph_transform.hpp.
void TMBad::clique::get_stride | ( | const clique & | super, |
Index | ind, | ||
std::vector< ad_plain > & | offset, | ||
Index & | stride | ||
) |
Determine array offsets and stride of this clique.
Recall that indices
are the sorted indices of this clique and logsum
is the value array of this clique. Also, recall that the value array is stored with the smallest index fastest running and largest index slowest running. Assume that super
is a larger clique than this one, so that this clique can be embedded into the super clique. Also, assume that both cliques contain a common index i
to be integrated. The routine get_stride()
locates the integration slice in this
array for any combination of super indices not to be integrated.
super | 'Super clique' containing this clique's indices as a subset. |
i | Index to integrate out of the super clique. |
offset | Output: Offset pointers into this array, one for each combination of super indices except i. |
stride | Output: Stride of the integration index (i) within this array. |