26#include <unordered_map>
30#include <boost/lexical_cast.hpp>
47 return ([val](
Index number_of_sig_figs) ->
string {
49 lStream << setprecision(
int(number_of_sig_figs)) << val;
60 for (
auto it : int_vals) {
61 keys.push_back(it.first);
63 sort(keys.begin(), keys.end());
64 for (
auto key : keys) {
65 int_string_id.append(key);
66 auto it = int_vals.find(key);
67 int_string_id.append(lexical_cast<string>(it->second));
77 string double_string_id;
78 for (
auto it : double_vals) {
79 keys.push_back(it.first);
81 sort(keys.begin(), keys.end());
82 for (
auto key : keys) {
83 double_string_id.append(key);
84 auto it = double_vals.find(key);
85 double_string_id.append(
sig_fig_(it->second, 8));
87 return double_string_id;
96 for (
auto it : str_vals) {
97 keys.push_back(it.first);
99 sort(keys.begin(), keys.end());
100 for (
auto key : keys) {
101 str_string_id.append(key);
102 auto it = str_vals.find(key);
103 str_string_id.append(lexical_cast<string>(it->second));
105 return str_string_id;
124 const unordered_map<string, double> double_vals,
125 const unordered_map<string, string> str_vals) {
149 throw invalid_argument(
150 "GraphNode does not "
158 throw invalid_argument(
159 "GraphNode does not "
167 throw invalid_argument(
168 "GraphNode does not "
179 return !((*this) != gn);
183 os <<
"Integer Values" << endl;
184 for (
const auto& int_val : gn.
int_vals_) {
185 os << int_val.first <<
" " << int_val.second << endl;
187 os <<
"Double Values" << endl;
189 os << double_val.first <<
" " << double_val.second << endl;
191 os <<
"String Values" << endl;
192 for (
const auto& str_val : gn.
str_vals_) {
193 os << str_val.first <<
" " << str_val.second << endl;
base class for all analysis tools