occ
Loading...
Searching...
No Matches
util.h File Reference
#include <algorithm>
#include <cctype>
#include <chrono>
#include <fmt/core.h>
#include <fmt/ostream.h>
#include <locale>
#include <numeric>
#include <occ/core/linear_algebra.h>
#include <string>
#include <vector>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  occ
 
namespace  occ::util
 

Functions

template<typename TA , typename TB >
bool occ::util::all_close (const Eigen::DenseBase< TA > &a, const Eigen::DenseBase< TB > &b, const typename TA::RealScalar &rtol=Eigen::NumTraits< typename TA::RealScalar >::dummy_precision(), const typename TA::RealScalar &atol=Eigen::NumTraits< typename TA::RealScalar >::epsilon())
 
template<typename T >
constexpr bool occ::util::is_close (T a, T b, const T rtol=Eigen::NumTraits< T >::dummy_precision(), const T atol=Eigen::NumTraits< T >::epsilon())
 
template<typename T >
constexpr bool occ::util::is_even (T a)
 
template<typename T >
constexpr bool occ::util::is_odd (T a)
 
bool occ::util::startswith (const std::string &h, const std::string &prefix, bool trimmed=true)
 
template<typename T >
std::string occ::util::human_readable_size (T number, const std::string &suffix)
 
std::string occ::util::human_readable_time (std::chrono::milliseconds duration)
 
template<class M , class N >
constexpr std::common_type_t< M, N > occ::util::smallest_common_factor (M m, N n)
 
template<typename T >
size_t occ::util::index_of (T x, const std::vector< T > &vec)