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

Class use_gaussian_weights

dlib/graph_utils/function_objects.h:97–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95// ----------------------------------------------------------------------------------------
96
97 struct use_gaussian_weights
98 {
99 use_gaussian_weights (
100 )
101 {
102 gamma = 0.1;
103 }
104
105 use_gaussian_weights (
106 double g
107 )
108 {
109 gamma = g;
110 }
111
112 double gamma;
113
114 template <typename edge_type>
115 double operator() (
116 const edge_type& e
117 ) const
118 {
119 return std::exp(-gamma*e.distance());
120 }
121 };
122
123// ----------------------------------------------------------------------------------------
124

Callers 2

do_the_testMethod · 0.50

Calls

no outgoing calls

Tested by 2

do_the_testMethod · 0.40