MCPcopy Create free account
hub / github.com/davisking/dlib / pow1

Function pow1

dlib/matrix/matrix_math_functions.h:98–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96
97 template <typename type, typename S>
98 inline type pow1 (const type& val, const S& s)
99 {
100 // you can only call pow() on matrices that contain floats, doubles or long doubles.
101 COMPILE_TIME_ASSERT((
102 is_same_type<type,float>::value == true ||
103 is_same_type<type,double>::value == true ||
104 is_same_type<type,long double>::value == true
105 ));
106
107 return std::pow(val,static_cast<type>(s));
108 }
109
110 template <typename type, typename S>
111 inline type pow2 (const S& s, const type& val)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected