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

Method init

dlib/svm/structural_svm_problem.h:46–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 typedef typename structural_svm_problem::feature_vector_type feature_vector_type;
45
46 void init (
47 const structural_svm_problem* prob_,
48 const long idx
49 )
50 /*!
51 ensures
52 - This object will be a cache for the idx-th sample in the given
53 structural_svm_problem.
54 !*/
55 {
56 prob = prob_;
57 sample_idx = idx;
58
59 loss.clear();
60 psi.clear();
61 lru_count.clear();
62
63 if (prob->get_max_cache_size() != 0)
64 {
65 prob->get_truth_joint_feature_vector(idx, true_psi);
66 compact_sparse_vector(true_psi);
67 }
68 }
69
70 void get_truth_joint_feature_vector_cached (
71 feature_vector_type& psi

Callers 2

threadMethod · 0.45
get_riskMethod · 0.45

Calls 3

clearMethod · 0.45
get_max_cache_sizeMethod · 0.45

Tested by

no test coverage detected