template<int N>
class Eigen::internal::VariableAndFixedInt< N >
This class embeds both a compile-time integer N and a runtime integer. Both values are supposed to be equal unless the compile-time value N has a special value meaning that the runtime-value should be used. Depending on the context, this special value can be either Eigen::Dynamic (for positive quantities) or Eigen::DynamicIndex (for quantities that can be negative).
It is the return-type of the function Eigen::fix<N>(int), and most of the time this is the only way it is used. It is strongly discouraged to directly deal with instances of VariableAndFixedInt. Indeed, in order to write generic code, it is the responsibility of the callee to properly convert it to either a true compile-time quantity (i.e. a FixedInt<N>), or to a runtime quantity (e.g., an Index) using the following generic helper:
T type
Definition: IntegralConstant.h:184
where T can be a template instantiation of VariableAndFixedInt or numerous other integer-like representations. DynamicKey is either Dynamic (default) or DynamicIndex and used to identify true compile-time values.
For convenience, you can also extract the compile-time value N using the following helper:
static const int value
Definition: IntegralConstant.h:156
that will give you N if T equals VariableAndFixedInt<N>, and DefaultVal if T does not embed any compile-time value (e.g., T==int).
- See also
- fix<N>(int), class FixedInt