Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include <bprb/bprb_func_process.h>
00009 #include <bprb/bprb_parameters.h>
00010 #include <bsta/algo/bsta_sigma_normalizer.h>
00011
00012 #include <vcl_string.h>
00013 #ifdef DEBUG
00014 #include <vcl_iostream.h>
00015 #endif
00016
00017 #include <brdb/brdb_value.h>
00018
00019
00020 bool bsta_sigma_normalization_table_process_cons(bprb_func_process& pro)
00021 {
00022
00023
00024
00025
00026 vcl_vector<vcl_string> input_types_(2);
00027 input_types_[0] = "float";
00028 input_types_[1] = "unsigned";
00029
00030
00031 vcl_vector<vcl_string> output_types_(1);
00032 output_types_[0]= "bsta_sigma_normalizer_sptr";
00033
00034 bool good = pro.set_input_types(input_types_) &&
00035 pro.set_output_types(output_types_);
00036
00037
00038 brdb_value_sptr idx = new brdb_value_t<unsigned>(40);
00039 pro.set_input(1, idx);
00040
00041 return good;
00042 }
00043
00044 bool bsta_sigma_normalization_table_process(bprb_func_process& pro)
00045 {
00046
00047 if (!pro.verify_inputs())
00048 {
00049 vcl_cout << pro.name() << ": Invalid inputs" << vcl_endl;
00050 return false;
00051 }
00052
00053
00054 float under_estimation_probability = pro.get_input<float>(0);
00055 unsigned n_precomputed = pro.get_input<int>(1);
00056
00057 pro.set_output_val<bsta_sigma_normalizer_sptr>(0, new bsta_sigma_normalizer(under_estimation_probability, n_precomputed));
00058 return true;
00059 }
00060