65     std::vector<std::vector<T>> 
combinations(
const std::vector<std::vector<T>>& v);
 
   70     std::vector<T> 
tail(
const T* 
const& ptr, 
int size, 
int start);
 
   73     template <
typename rank_t>
 
   77     template <
typename T, 
typename S>
 
   81     template <
typename T, 
typename S>
 
   85     template <
typename Derived>
 
   86     int64_t 
summation(
const Eigen::MatrixBase<Derived>& A);
 
   88     template <
typename rank_t>
 
   97     template <
typename Matrix_t>
 
  101     template <
typename T>
 
  105     template <
typename T>
 
  106     std::vector<T> 
operator+(
const std::vector<T>& a, 
const std::vector<T>& b);
 
  109     template <
typename T>
 
  110     std::vector<T> 
operator-(
const std::vector<T>& a, 
const std::vector<T>& b);
 
  113     template <
typename T>
 
  117     template <
typename T>
 
  121     template <
typename T>
 
  122     std::ostream& 
operator<<(std::ostream& out, 
const std::vector<T>& a);
 
  125     template <
typename T>
 
  129     template <
typename...>
 
  137         template <
typename S>
 
  142     template <
typename T>
 
  150         template <
typename S>
 
  155     template <
typename T>
 
  163         template <
typename S>
 
  168     template <
typename T, 
typename S>
 
  172     template <
typename T>
 
  176     template <
typename T, 
typename S>
 
  179     namespace implementation_details
 
  182         template <typename T, bool = mackey::SFINAE::is_Sparse<T>::value>
 
  183         class it_nnz_conditional;
 
  193     template <
typename T, 
bool row_only, 
bool col_only>
 
  196         typedef typename T::StorageIndex storage;
 
  197         using implementation_details::it_nnz_conditional<T>::is_sparse;
 
  198         using implementation_details::it_nnz_conditional<T>::inner_ind;
 
  199         using implementation_details::it_nnz_conditional<T>::it;
 
  211         IteratorNNZ(
const T& matrix, storage row_start, storage col_start);
 
  220         const storage inner_start;
 
  222         void increase_until_it_works();
 
  225 #include "impl/General.ipp" 
Contains general template aliases.
 
Perfect hashes vectors between given min and max.
Definition: General.hpp:157
 
size_t operator()(const S &) const
 
Hash(const T &, const T &)
 
Perfect hashes vectors between 0 and given max.
Definition: General.hpp:144
 
size_t operator()(const S &) const
 
Hashes vectors with collisions.
Definition: General.hpp:135
 
size_t operator()(const S &) const
 
General template class for hashing vectors.
Definition: General.hpp:130
 
Constant iterator through generated vectors.
Definition: General.hpp:35
 
auto & operator++()
Generates next element.
 
bool operator!=(const const_iterator &other) const
Inequality of iterators.
 
const T & operator*() const
Returns the generated vector.
 
Generates all vectors interpolating between given min and max vectors.
Definition: General.hpp:21
 
size_t size() const
Returns the total amount of elements that will be generated.
 
InterpolatingVectorGenerator(const T &min, const T &max)
Constructor using min, max and policy.
 
auto begin() const
Initial generator.
 
auto end() const
Terminal generator.
 
std::vector< T > operator()() const
Returns vector of all generated elements.
 
Iterator over nonzero entries of Eigen matrices.
Definition: General.hpp:195
 
IteratorNNZ(const T &matrix, storage row_start, storage col_start)
Constructor given matrix and block (lower right corner)
 
IteratorNNZ & operator++()
Increase iterator.
 
auto col()
The column index.
 
IteratorNNZ(const T &matrix, storage start)
Constructor given matrix and symmetric block.
 
auto value()
The entry of the matrix.
 
Everything in this library is under this namespace.
Definition: Box.hpp:9
 
typename T::Scalar scalar_t
Scalar of matrix.
Definition: Aliases.hpp:14
 
void rotate(T &V)
Transforms V[0],V[1],...,V[n] to V[1],V[2],...,V[n],V[0].
 
std::ostream & operator<<(std::ostream &, const Chains< rank_t, diff_t > &)
Prints chain complex.
 
Z_mod< N, T > operator-(Z_mod< N, T > a)
 
T KeepCol(const T &A, const S &Z)
Makes a new matrix out of A keeping only its columns indicated by Z.
 
T KeepRow(const T &A, const S &Z)
Makes a new matrix out of A keeping only its rows indicated by Z.
 
bool isZero(const std::vector< T > &a)
Tests if vector is zero.
 
int64_t summation(const Eigen::MatrixBase< Derived > &A)
Takes the sum of the entries of an Eigen vector at higher precision than its inputs.
 
std::vector< std::vector< T > > combinations(const std::vector< std::vector< T >> &v)
Given a vector of vectors v form all combinations of the form {v[0][?],v[1][?],......
 
Z_mod< N, T > operator*(Z_mod< N, T > a, Z_mod< N, T > b)
 
std::vector< triplet_t< T > > make_triplets(const T &a)
Turn sparse matrix into a vector of Eigen triplets.
 
std::vector< T > operator+(const std::vector< T > &a, const std::vector< T > &b)
Coordinate-wise sum of vectors (up to the minimum of their lengths)
 
std::vector< triplet_t< T > > keep_row_triplets(const T &a, const S &keep)
Turn sparse matrix into a vector of Eigen triplets.
 
std::vector< T > tail(const T *const &ptr, int size, int start)
Given vector or array returns vector starting from index start.
 
int64_t perfect_hash(const T °, const S &min, const S &max)
Perfect hash vectors given minimum and maximum values of entries.
 
rank_t basisElement(int length, int position, int multiple=1)
Makes the multiple of the basis vector 0,...,multiple,...,0.
 
Matrix_t altmatrix(int m, int n, const std::vector< scalar_t< Matrix_t >> &v)
Creates a matrix of size m x n that alternates the given vector v.
 
int lcm(const T &v)
Least common multiple of vector of elements.