24 const std::string &data_column_key,
25 const std::string &reference_column_key,
27 const unsigned int dim)
33 if (rate_mode ==
none)
40 std::vector<internal::TableEntry> &entries =
columns[data_column_key].entries;
41 std::vector<internal::TableEntry> &ref_entries =
42 columns[reference_column_key].entries;
43 std::string rate_key = data_column_key +
"...";
45 const unsigned int n = entries.size();
46 const unsigned int n_ref = ref_entries.size();
49 std::vector<double> values(n);
50 std::vector<double> ref_values(n_ref);
52 for (
unsigned int i = 0; i < n; ++i)
54 values[i] = entries[i].get_numeric_value();
55 ref_values[i] = ref_entries[i].get_numeric_value();
58 unsigned int no_rate_entries = 0;
64 rate_key +=
"red.rate";
65 no_rate_entries =
columns[rate_key].entries.size();
67 for (
unsigned int i = no_rate_entries; i < n; ++i)
77 values[i - 1] / values[i] * ref_values[i] /
83 rate_key +=
"red.rate.log2";
84 no_rate_entries =
columns[rate_key].entries.size();
86 for (
unsigned int i = no_rate_entries; i < n; ++i)
96 dim * std::log(
std::fabs(values[i - 1] / values[i])) /
98 std::fabs(ref_values[i] / ref_values[i - 1])));
110 const std::string &superkey = data_column_key;
118 if (no_rate_entries == 0)
136 std::vector<internal::TableEntry> &entries =
columns[data_column_key].entries;
137 std::string rate_key = data_column_key +
"...";
139 const unsigned int n = entries.size();
141 std::vector<double> values(n);
142 for (
unsigned int i = 0; i < n; ++i)
143 values[i] = entries[i].get_numeric_value();
145 unsigned int no_rate_entries = 0;
153 rate_key +=
"red.rate";
154 no_rate_entries =
columns[rate_key].entries.size();
156 for (
unsigned int i = no_rate_entries; i < n; ++i)
165 add_value(rate_key, values[i - 1] / values[i]);
171 rate_key +=
"red.rate.log2";
172 no_rate_entries =
columns[rate_key].entries.size();
174 for (
unsigned int i = no_rate_entries; i < n; ++i)
184 std::log(
std::fabs(values[i - 1] / values[i])) /
199 const std::string &superkey = data_column_key;
209 if (no_rate_entries == 0)
219 const std::string &key)
223 const std::map<std::string, Column>::iterator col_iter =
columns.find(key);
224 col_iter->second.flag = 1;
231 const std::string &reference_column_key,
234 for (std::map<std::string, Column>::const_iterator col_iter =
columns.begin();
237 if (!col_iter->second.flag)
239 reference_column_key,
248 for (std::map<std::string, Column>::const_iterator col_iter =
columns.begin();
251 if (!col_iter->second.flag)