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

Class ordered_sample_pair

dlib/graph_utils/ordered_sample_pair.h:15–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13// ----------------------------------------------------------------------------------------
14
15 class ordered_sample_pair
16 {
17 public:
18 ordered_sample_pair(
19 ) :
20 _index1(0),
21 _index2(0)
22 {
23 _distance = 1;
24 }
25
26 ordered_sample_pair (
27 const unsigned long idx1,
28 const unsigned long idx2
29 )
30 {
31 _distance = 1;
32 _index1 = idx1;
33 _index2 = idx2;
34 }
35
36 ordered_sample_pair (
37 const unsigned long idx1,
38 const unsigned long idx2,
39 const double dist
40 )
41 {
42 _distance = dist;
43 _index1 = idx1;
44 _index2 = idx2;
45 }
46
47 const unsigned long& index1 (
48 ) const { return _index1; }
49
50 const unsigned long& index2 (
51 ) const { return _index2; }
52
53 const double& distance (
54 ) const { return _distance; }
55
56 private:
57 unsigned long _index1;
58 unsigned long _index2;
59 double _distance;
60 };
61
62// ----------------------------------------------------------------------------------------
63

Callers 5

deserializeFunction · 0.70
newman_cluster_helperFunction · 0.50

Calls

no outgoing calls

Tested by 1