.. _program_listing_file_src_navtk_inspect.hpp: Program Listing for File inspect.hpp ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/navtk/inspect.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include namespace navtk { template bool has_zero_size(const T& expression) { return expression.begin() == expression.end(); } bool is_symmetric(const Matrix& mat, double rtol = 1e-5, double atol = 1e-8); bool is_diagonal(const Matrix& mat); bool is_identity(const Matrix& mat); std::vector> non_symmetric_elements(const Matrix& mat, double rtol = 1e-5, double atol = 1e-8); template struct TensorMeta { static constexpr bool FIXED_DIMS = false; }; template struct TensorMeta::value>> { static constexpr bool FIXED_DIMS = true; static constexpr auto dimCount = std::tuple_size::type::shape_type>::value; }; template using IfTensorOfDim = std::enable_if_t::dimCount == Dim>; template using IfBothTensorsOfDim = std::enable_if_t::dimCount == Dim && TensorMeta::dimCount == Dim>; template using IfFirstTensorOfDim = std::enable_if_t::dimCount == Dim && TensorMeta::dimCount != Dim>; template using IfSecondTensorOfDim = std::enable_if_t::dimCount != Dim && TensorMeta::dimCount == Dim>; template using IfEigenInterface = std::enable_if_t::value && std::is_member_function_pointer::value>; Size num_rows(const Matrix& m); Size num_rows(const Vector& c); Size num_cols(const Matrix& m); Size num_cols(const Vector& r); } // namespace navtk