6 #ifndef DISMEC_HASH_VECTOR_H
7 #define DISMEC_HASH_VECTOR_H
85 template<
class Derived>
137 return !(*
this == other);
153 return vec.
get() + other;
158 return other + vec.
get() ;
163 return other += vec.
get() ;
168 return vec.
get() * other;
173 return other * vec.
get() ;
178 return other *= vec.
get() ;
const DenseRealVector & update(const HashVector &input, F &&function)
CacheHelper(Eigen::Index size)
An Eigen vector with versioning information, to implement simple caching of results.
VectorHash hash() const
Gets the unique id of this vector.
HashVector & operator=(const Eigen::EigenBase< Derived > &expr)
Update the contents of this vector.
const DenseRealVector * operator->() const
constant access to vector data.
const DenseRealVector & get() const
Gets a constant reference to the data of this vector.
HashVector(DenseRealVector data)
Creates a new hash vector from the given DenseRealVector.
DenseRealVector & modify()
Gets non-const access to the underlying data.
A unique identifier for a HashVector.
VectorHash()
Default constructor. Initializes the VectorHash to special marker.
VectorHash(std::size_t id)
Creates a VectorHash for the given ID.
bool operator==(const VectorHash &other) const
Checks that two hashes are equal.
bool operator!=(const VectorHash &other) const
negation of the equality check
Main namespace in which all types, classes, and functions are defined.
auto operator*=(T &&other, const HashVector &vec)
auto operator*(const HashVector &vec, T &&other)
types::DenseVector< real_t > DenseRealVector
Any dense, real values vector.
auto operator+=(T &&other, const HashVector &vec)
label_id_t operator+(label_id_t a, std::ptrdiff_t b)