From ad1c665ab42052a5ad7207d379cb82910eed55a3 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 10 Mar 2012 14:51:55 -0500 Subject: [PATCH] All I did in this commit was remove any of the ::kernel_1a, ::expand_1a, qualifiers from any uses of dlib::array. --- dlib/bayes_utils/bayes_utils.h | 6 +++--- dlib/gui_widgets/base_widgets.h | 16 ++++++++-------- dlib/gui_widgets/fonts.h | 2 +- dlib/gui_widgets/widgets.h | 10 +++++----- dlib/image_keypoint/hessian_pyramid.h | 2 +- dlib/image_keypoint/poly_image.h | 2 +- dlib/image_processing/scan_image_pyramid.h | 4 ++-- dlib/matrix/symmetric_matrix_cache.h | 4 ++-- dlib/svm/kkmeans.h | 4 ++-- .../structural_svm_object_detection_problem.h | 2 +- dlib/test/matrix2.cpp | 2 +- dlib/test/object_detector.cpp | 14 +++++++------- dlib/test/scan_image.cpp | 8 ++++---- dlib/test/sockets2.cpp | 2 +- dlib/threads/thread_pool_extension.h | 4 ++-- examples/object_detector_advanced_ex.cpp | 3 +-- examples/object_detector_ex.cpp | 3 +-- 17 files changed, 43 insertions(+), 45 deletions(-) diff --git a/dlib/bayes_utils/bayes_utils.h b/dlib/bayes_utils/bayes_utils.h index 95529c26a..72d847291 100644 --- a/dlib/bayes_utils/bayes_utils.h +++ b/dlib/bayes_utils/bayes_utils.h @@ -1272,7 +1272,7 @@ namespace dlib private: graph< joint_probability_table, joint_probability_table >::kernel_1a_c join_tree_values; - array::expand_1a_c cliques; + array cliques; mutable joint_probability_table table; mutable assignment var; mutable matrix dist; @@ -1496,8 +1496,8 @@ namespace dlib // the tree is now initialized. Now all we need to do is perform the propagation and // we are done - dlib::array::compare_1b_c>::expand_1a_c remaining_msg_to_send; - dlib::array::compare_1b_c>::expand_1a_c remaining_msg_to_receive; + dlib::array::compare_1b_c> remaining_msg_to_send; + dlib::array::compare_1b_c> remaining_msg_to_receive; remaining_msg_to_receive.resize(join_tree.number_of_nodes()); remaining_msg_to_send.resize(join_tree.number_of_nodes()); for (unsigned long i = 0; i < remaining_msg_to_receive.size(); ++i) diff --git a/dlib/gui_widgets/base_widgets.h b/dlib/gui_widgets/base_widgets.h index 751234648..c96cfedea 100644 --- a/dlib/gui_widgets/base_widgets.h +++ b/dlib/gui_widgets/base_widgets.h @@ -2135,16 +2135,16 @@ namespace dlib rectangle win_rect; unsigned long left_width; unsigned long middle_width; - array >::expand_1d_c items; - array::expand_1d_c item_enabled; - array::expand_1d_c left_rects; - array::expand_1d_c middle_rects; - array::expand_1d_c right_rects; - array::expand_1d_c line_rects; - array::expand_1d_c submenus; + array > items; + array item_enabled; + array left_rects; + array middle_rects; + array right_rects; + array line_rects; + array submenus; unsigned long selected_item; bool submenu_open; - array::kernel_1a>::expand_1d_c hide_handlers; + array::kernel_1a> hide_handlers; // restricted functions popup_menu(popup_menu&); // copy constructor diff --git a/dlib/gui_widgets/fonts.h b/dlib/gui_widgets/fonts.h index 4b720aae4..f81239342 100644 --- a/dlib/gui_widgets/fonts.h +++ b/dlib/gui_widgets/fonts.h @@ -600,7 +600,7 @@ namespace dlib bool bitmap_to_letter( array2d& bitmap, unichar enc, unsigned long width, int x_offset, int y_offset ); - array::expand_1b_c gl; + array gl; unichar default_char; // if (is_intialized == true), then this MUST be an actual glyph bool is_initialized; rectangle fbb; diff --git a/dlib/gui_widgets/widgets.h b/dlib/gui_widgets/widgets.h index a936c5d23..6f46ea8ff 100644 --- a/dlib/gui_widgets/widgets.h +++ b/dlib/gui_widgets/widgets.h @@ -1306,7 +1306,7 @@ namespace dlib unsigned long selected_tab_; - array::kernel_2a_c tabs; + array tabs; const long left_pad; const long right_pad; @@ -1817,7 +1817,7 @@ namespace dlib }; bool ms_enabled; - typename array >::kernel_2a_c items; + array > items; any_function event_handler; any_function single_click_event_handler; unsigned long last_selected; @@ -2150,7 +2150,7 @@ namespace dlib point underline_p2; }; - array::kernel_2a_c menus; + array menus; unsigned long open_menu; // restricted functions @@ -3178,8 +3178,8 @@ namespace dlib ); array2d grid; - array::kernel_2a_c col_width; - array::kernel_2a_c row_height; + array col_width; + array row_height; bool has_focus; long active_col; long active_row; diff --git a/dlib/image_keypoint/hessian_pyramid.h b/dlib/image_keypoint/hessian_pyramid.h index be651d1bc..f69f62a6b 100644 --- a/dlib/image_keypoint/hessian_pyramid.h +++ b/dlib/image_keypoint/hessian_pyramid.h @@ -310,7 +310,7 @@ namespace dlib long initial_step_size; typedef array2d image_type; - typedef array::expand_1d pyramid_type; + typedef array pyramid_type; pyramid_type pyramid; }; diff --git a/dlib/image_keypoint/poly_image.h b/dlib/image_keypoint/poly_image.h index 970cdf6e9..20c62afcc 100644 --- a/dlib/image_keypoint/poly_image.h +++ b/dlib/image_keypoint/poly_image.h @@ -627,7 +627,7 @@ namespace dlib std::vector > filters; - dlib::array >::expand_1b poly_coef; + dlib::array > poly_coef; long order; long window_size; long border_size; diff --git a/dlib/image_processing/scan_image_pyramid.h b/dlib/image_processing/scan_image_pyramid.h index 3e1dffbca..981e37f99 100644 --- a/dlib/image_processing/scan_image_pyramid.h +++ b/dlib/image_processing/scan_image_pyramid.h @@ -187,7 +187,7 @@ namespace dlib } feature_extractor_type feats_config; // just here to hold configuration. use it to populate the feats elements. - typename array::kernel_2a feats; + array feats; std::vector det_templates; unsigned long max_dets_per_template; unsigned long max_pyramid_levels; @@ -534,7 +534,7 @@ namespace dlib dets.clear(); - array >::kernel_2a saliency_images; + array > saliency_images; saliency_images.set_max_size(get_num_components_per_detection_template()); saliency_images.set_size(get_num_components_per_detection_template()); std::vector > region_rects(get_num_components_per_detection_template()); diff --git a/dlib/matrix/symmetric_matrix_cache.h b/dlib/matrix/symmetric_matrix_cache.h index 6e26dd937..b93b9e5be 100644 --- a/dlib/matrix/symmetric_matrix_cache.h +++ b/dlib/matrix/symmetric_matrix_cache.h @@ -222,8 +222,8 @@ namespace dlib !*/ - mutable typename array >::expand_1a cache; - mutable typename array::expand_1a references; + mutable array > cache; + mutable array references; matrix diag_cache; mutable std::vector lookup; mutable std::vector rlookup; diff --git a/dlib/svm/kkmeans.h b/dlib/svm/kkmeans.h index b57428afa..c8af2ce43 100644 --- a/dlib/svm/kkmeans.h +++ b/dlib/svm/kkmeans.h @@ -270,12 +270,12 @@ namespace dlib } - typename array > >::expand_1b_c centers; + array > > centers; kcentroid kc; scalar_type min_change; // temp variables - array::expand_1b_c assignments; + array assignments; }; // ---------------------------------------------------------------------------------------- diff --git a/dlib/svm/structural_svm_object_detection_problem.h b/dlib/svm/structural_svm_object_detection_problem.h index b8de6e9c2..14cc8c616 100644 --- a/dlib/svm/structural_svm_object_detection_problem.h +++ b/dlib/svm/structural_svm_object_detection_problem.h @@ -408,7 +408,7 @@ namespace dlib overlap_tester_type boxes_overlap; - mutable typename array::kernel_2a scanners; + mutable array scanners; const image_array_type& images; const std::vector >& truth_rects; diff --git a/dlib/test/matrix2.cpp b/dlib/test/matrix2.cpp index 2bd35f877..626325673 100644 --- a/dlib/test/matrix2.cpp +++ b/dlib/test/matrix2.cpp @@ -166,7 +166,7 @@ namespace std::vector stdv(4); std_vector_c stdv_c(4); - dlib::array::expand_1a_c arr; + dlib::array arr; arr.resize(4); for (long i = 0; i < 4; ++i) stdv[i] = stdv_c[i] = arr[i] = i+1; diff --git a/dlib/test/object_detector.cpp b/dlib/test/object_detector.cpp index 241ef60e5..0712f3261 100644 --- a/dlib/test/object_detector.cpp +++ b/dlib/test/object_detector.cpp @@ -256,7 +256,7 @@ namespace print_spinner(); dlog << LINFO << "test_1()"; - typedef array >::expand_1b grayscale_image_array_type; + typedef array > grayscale_image_array_type; grayscale_image_array_type images; std::vector > object_locations; make_simple_test_data(images, object_locations); @@ -298,7 +298,7 @@ namespace print_spinner(); dlog << LINFO << "test_1_fine_hog()"; - typedef array >::expand_1b grayscale_image_array_type; + typedef array > grayscale_image_array_type; grayscale_image_array_type images; std::vector > object_locations; make_simple_test_data(images, object_locations); @@ -340,7 +340,7 @@ namespace print_spinner(); dlog << LINFO << "test_1_poly()"; - typedef array >::expand_1b grayscale_image_array_type; + typedef array > grayscale_image_array_type; grayscale_image_array_type images; std::vector > object_locations; make_simple_test_data(images, object_locations); @@ -382,7 +382,7 @@ namespace print_spinner(); dlog << LINFO << "test_1_poly_nn()"; - typedef array >::expand_1b grayscale_image_array_type; + typedef array > grayscale_image_array_type; grayscale_image_array_type images; std::vector > object_locations; make_simple_test_data(images, object_locations); @@ -428,7 +428,7 @@ namespace print_spinner(); dlog << LINFO << "test_2()"; - typedef array >::expand_1b grayscale_image_array_type; + typedef array > grayscale_image_array_type; grayscale_image_array_type images; std::vector > object_locations; make_simple_test_data(images, object_locations); @@ -513,8 +513,8 @@ namespace dlog << LINFO << "test_3()"; - typedef array >::expand_1b grayscale_image_array_type; - typedef array::expand_1b funny_image_array_type; + typedef array > grayscale_image_array_type; + typedef array funny_image_array_type; grayscale_image_array_type images_temp; funny_image_array_type images; std::vector > object_locations; diff --git a/dlib/test/scan_image.cpp b/dlib/test/scan_image.cpp index d461da372..257f6697d 100644 --- a/dlib/test/scan_image.cpp +++ b/dlib/test/scan_image.cpp @@ -68,7 +68,7 @@ namespace { typedef typename image_array_type::type::type pixel_type; typedef typename promote::type ptype; - typename array >::kernel_2a iimg; + array > iimg; iimg.set_max_size(images.size()); iimg.set_size(images.size()); @@ -222,7 +222,7 @@ namespace fill_rect(img, rect, 255); - array >::expand_1b images; + array > images; std::vector > rects; for (int i = 0; i < 10; ++i) { @@ -276,7 +276,7 @@ namespace fill_rect(img, rect, 255); - array >::expand_1b images; + array > images; std::vector > rects; for (int i = 0; i < 10; ++i) { @@ -326,7 +326,7 @@ namespace rnd.set_seed("235"); - typename array >::expand_1b images; + array > images; images.resize(1); images[0].set_size(200,180); diff --git a/dlib/test/sockets2.cpp b/dlib/test/sockets2.cpp index 56af23706..49c395c31 100644 --- a/dlib/test/sockets2.cpp +++ b/dlib/test/sockets2.cpp @@ -128,7 +128,7 @@ namespace start(); - array >::expand_1a_c cons; + array > cons; std::vector bytes_received(6,0); scoped_ptr con_temp; diff --git a/dlib/threads/thread_pool_extension.h b/dlib/threads/thread_pool_extension.h index b41402e36..20cee1384 100644 --- a/dlib/threads/thread_pool_extension.h +++ b/dlib/threads/thread_pool_extension.h @@ -454,8 +454,8 @@ namespace dlib }; - array::expand_1d tasks; - array::expand_1d worker_thread_ids; + array tasks; + array worker_thread_ids; mutex m; signaler task_done_signaler; diff --git a/examples/object_detector_advanced_ex.cpp b/examples/object_detector_advanced_ex.cpp index 4aadd440c..4343c3398 100644 --- a/examples/object_detector_advanced_ex.cpp +++ b/examples/object_detector_advanced_ex.cpp @@ -191,8 +191,7 @@ int main() try { // Get some data - typedef array >::expand_1b grayscale_image_array_type; - grayscale_image_array_type images; + array > images; std::vector > object_locations; make_simple_test_data(images, object_locations); diff --git a/examples/object_detector_ex.cpp b/examples/object_detector_ex.cpp index 67bc72d81..96bd11ece 100644 --- a/examples/object_detector_ex.cpp +++ b/examples/object_detector_ex.cpp @@ -101,8 +101,7 @@ int main() try { // The first thing we do is create the set of 3 images discussed above. - typedef array >::expand_1b grayscale_image_array_type; - grayscale_image_array_type images; + array > images; std::vector > object_locations; make_simple_test_data(images, object_locations);