occ
Loading...
Searching...
No Matches
occ::util Namespace Reference

Functions

template<typename TA , typename TB >
bool 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 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 is_even (T a)
 
template<typename T >
constexpr bool is_odd (T a)
 
bool startswith (const std::string &h, const std::string &prefix, bool trimmed=true)
 
template<typename T >
std::string human_readable_size (T number, const std::string &suffix)
 
std::string human_readable_time (std::chrono::milliseconds duration)
 
template<class M , class N >
constexpr std::common_type_t< M, N > smallest_common_factor (M m, N n)
 
template<typename T >
size_t index_of (T x, const std::vector< T > &vec)
 

Function Documentation

◆ all_close()

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() 
)

◆ human_readable_size()

template<typename T >
std::string occ::util::human_readable_size ( number,
const std::string &  suffix 
)

◆ human_readable_time()

std::string occ::util::human_readable_time ( std::chrono::milliseconds  duration)
inline

◆ index_of()

template<typename T >
size_t occ::util::index_of ( x,
const std::vector< T > &  vec 
)

◆ is_close()

template<typename T >
constexpr bool occ::util::is_close ( a,
b,
const T  rtol = Eigen::NumTraits<T>::dummy_precision(),
const T  atol = Eigen::NumTraits<T>::epsilon() 
)
constexpr

◆ is_even()

template<typename T >
constexpr bool occ::util::is_even ( a)
constexpr

◆ is_odd()

template<typename T >
constexpr bool occ::util::is_odd ( a)
constexpr

◆ smallest_common_factor()

template<class M , class N >
constexpr std::common_type_t< M, N > occ::util::smallest_common_factor ( m,
n 
)
constexpr

◆ startswith()

bool occ::util::startswith ( const std::string &  h,
const std::string &  prefix,
bool  trimmed = true 
)
inline