MCPcopy Create free account
hub / github.com/davisking/dlib / operator()

Method operator()

dlib/graph_utils/function_objects.h:55–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 {
54 template <typename sample_type>
55 double operator() (
56 const sample_type& a,
57 const sample_type& b
58 ) const
59 {
60 const double temp = length(a)*length(b);
61 if (temp == 0)
62 return 0;
63 else
64 return 1-dot(a,b)/temp;
65 }
66 };
67
68// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

lengthFunction · 0.50
dotFunction · 0.50

Tested by

no test coverage detected