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)
constexpr double double_factorial (int n)
constexpr double double_factorial_2n_1 (int l)
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() )

◆ double_factorial()

double occ::util::double_factorial ( int n)
inlineconstexpr

◆ double_factorial_2n_1()

double occ::util::double_factorial_2n_1 ( int l)
inlineconstexpr

◆ human_readable_size()

template<typename T>
std::string occ::util::human_readable_size ( T 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 ( T x,
const std::vector< T > & vec )

◆ is_close()

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

◆ is_even()

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

◆ is_odd()

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

◆ smallest_common_factor()

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

◆ startswith()

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