8 namespace SymRepTools_v2 {
11 : m_cols(vector.cols()), m_norm(vector.
norm()) {}
22 return A_invariants.
cols() == B_invariants.
cols() &&
28 if (A_invariants.
cols() == B_invariants.
cols()) {
31 return A_invariants.
cols() < B_invariants.
cols();
34 namespace SymRepTools_v2 {
37 : m_matrix_rep(matrix_rep), m_tol(tol) {}
41 Eigen::VectorXcd
const &vector_B)
const {
47 Eigen::VectorXcd
const &vector)
const {
53 Eigen::VectorXcd vector)
const {
65 Eigen::VectorXcd
const &B_prototype,
76 return this->
compare(A_prototype, B_prototype);
80 template <
typename Derived>
81 typename Derived::PlainObject vector_space_prepare_impl(
82 Eigen::MatrixBase<Derived>
const &obj,
double _tol) {
83 typename Derived::PlainObject result =
87 .leftCols(obj.cols());
89 for (
CASM::Index row = 0; row < result.rows(); ++row) {
91 for (i = col; i < result.cols(); ++i) {
93 result.col(i) *= std::abs(result(row, i)) / result(row, i);
111 return vector_space_prepare_impl(vector_space, tol);
122 return vector_space_prepare_impl(vector_space, tol);
T norm(const Tensor< T > &ttens)
bool almost_equal(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
Check if ClusterInvariants are equal.
bool compare(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
Compare ClusterInvariants.
bool colmajor_lex_compare(const Eigen::MatrixBase< Derived > &A, const Eigen::MatrixBase< Derived > &B, double tol)
Floating point lexicographical comparison with tol.
bool almost_zero(const T &val, double tol=TOL)
If T is not integral, use std::abs(val) < tol;.
INDEX_TYPE Index
For long integer indexing:
Derived::PlainObject reduced_column_echelon(Eigen::MatrixBase< Derived > const &M, double _tol)