83 template <
typename _Container,
typename _value_type,
typename _size_type,
84 typename _Access,
typename _Compare>
87 template <
typename _Container,
typename _value_type,
typename _size_type,
88 typename _Access,
typename _Compare>
90 Counter<_Container, _value_type, _size_type, _Access, _Compare> > {
101 template <
typename _Container,
102 typename _value_type =
typename _Container::value_type,
109 Counter<_Container, _value_type, _size_type, _Access, _Compare> > {
111 using Base::_current;
113 using Base::_increment;
114 using Base::_initial;
131 using Base::operator();
132 using Base::operator[];
133 using Base::operator bool;
155 if (!
valid())
return *
this;
161 if (i == this->
size()) {
174 std::cerr <<
"CRITICAL ERROR: In IsoCounter::set_current(), new state is "
175 "incompatible with this counter.\n"
214 template <
typename EigenType>
A Counter allows looping over many incrementing variables in one loop.
const value_type & _initial(size_type index) const
const value_type & _upper(size_type index) const
bool & _valid()
non-const reference bool validity flag
const value_type & _final(size_type index) const
bool compare(const value_type &A, const value_type &B)
const value_type & _increment(size_type index) const
const value_type & _lower(size_type index) const
const Container & current() const
const Container & initial() const
A Counter allows looping over many incrementing variables in one loop.
void _init()
Called from the constructor to set m_lower and m_upper appropriately.
Counter()
Default construct a Counter.
void reset()
Reset the current value of the Counter to the initial value.
traits< Counter >::Base Base
Counter(const Container &_initial, const Container &_final, const Container &_increment, Access _access=Access(), Compare _compare=Compare())
Construct a Counter-type object.
void set_current(const Container &new_current)
EigenCounter< Eigen::Vector3i > EigenVector3iCounter
Counter for Eigen::Vector3i.
EigenCounter< Eigen::MatrixXd > EigenMatrixXdCounter
Counter for Eigen::MatrixXd.
EigenCounter< Eigen::MatrixXi > EigenMatrixXiCounter
Counter for Eigen::MatrixXd.
EigenCounter< Eigen::VectorXi > EigenVectorXiCounter
Counter for Eigen::VectorXi.
EigenCounter< Eigen::VectorXd > EigenVectorXdCounter
Counter for Eigen::VectorXd.
EigenCounter< Eigen::Vector3d > EigenVector3dCounter
Counter for Eigen::Vector3d.
EigenCounter< Eigen::Matrix3d > EigenMatrix3dCounter
Counter for Eigen::Matrix3d.
EigenCounter< Eigen::Matrix3i > EigenMatrix3iCounter
Counter for Eigen::MatrixXd.
typename std::conditional< std::is_integral< T >::value, IntegralLessThan< T >, FloatingPointLessThan< T > >::type MuchLessThan
bool compare(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
Compare ClusterInvariants.
INDEX_TYPE Index
For long integer indexing:
static bool _compare(T const &a, T const &b, double tol)
Helper Functor for Counter container access using operator[].
Helper Functor for Counter container access using operator()
BaseCounter< Counter< _Container, _value_type, _size_type, _Access, _Compare > > Base