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

Function pow2

dlib/matrix/matrix_math_functions.h:111–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110 template <typename type, typename S>
111 inline type pow2 (const S& s, const type& val)
112 {
113 // you can only call pow() on matrices that contain floats, doubles or long doubles.
114 COMPILE_TIME_ASSERT((
115 is_same_type<type,float>::value == true ||
116 is_same_type<type,double>::value == true ||
117 is_same_type<type,long double>::value == true
118 ));
119
120 return std::pow(static_cast<type>(s),val);
121 }
122
123 template <typename type>
124 inline type reciprocal (const type& val)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected