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

Method operator()

examples/custom_trainer_ex.cpp:47–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 sample_type positive_center, negative_center;
46
47 double operator() (
48 const sample_type& x
49 ) const
50 {
51 // if x is closer to the positive class then return +1
52 if (length(positive_center - x) < length(negative_center - x))
53 return +1;
54 else
55 return -1;
56 }
57};
58
59// Later on in this example we will save our decision functions to disk. This

Callers

nothing calls this directly

Calls 1

lengthFunction · 0.50

Tested by

no test coverage detected