Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
metric.cpp File Reference
#include "metric.h"
Include dependency graph for metric.cpp:

Go to the source code of this file.

Functions

void print_metrics ()
 Sample Correlation Coefficient. More...
 
metricmetric_select (int m, std::vector< points * > dss1, std::vector< points * > dss2, int var_ds1, int var_ds2, ofstream &outfile, string outprefix)
 

Function Documentation

metric* metric_select ( int  m,
std::vector< points * >  dss1,
std::vector< points * >  dss2,
int  var_ds1,
int  var_ds2,
ofstream &  outfile,
string  outprefix 
)

Definition at line 1194 of file metric.cpp.

Referenced by compareFiles().

1196  {
1197 
1198  metric *ret;
1199 
1200  //Indexed points conversion
1201  // - For metrics that require indexed_points
1202  //indexed_points *ds1_ip = dynamic_cast<indexed_points*>(ds1);
1203  //indexed_points *ds2_ip = dynamic_cast<indexed_points*>(ds2);
1204 
1205  switch (m){
1206 /*
1207  case 1:
1208  ret = new mse(ds1, ds2, var_ds1, var_ds2, outfile, outprefix);
1209  break;
1210 
1211  case 2:
1212  ret = new rmse(ds1, ds2, var_ds1, var_ds2, outfile, outprefix);
1213  break;
1214 
1215  case 3:
1216  ret = new scc(ds1, ds2, var_ds1, var_ds2, outfile, outprefix);
1217  break;
1218 
1219  case 4:
1220  ret = new difmap(ds1_ip, ds2_ip, var_ds1, var_ds2, outfile, outprefix);
1221  break;
1222 
1223  case 5:
1224  ret = new difmap_wkey(ds1_ip, ds2_ip, var_ds1, var_ds2, outfile, outprefix);
1225  break;
1226 
1227  case 6:
1228  ret = new colmap(ds1_ip, ds2_ip, var_ds1, var_ds2, outfile, outprefix);
1229  break;
1230 
1231  case 7:
1232  ret = new scorco(ds1, ds2, var_ds1, var_ds2, outfile, outprefix);
1233  break;
1234 
1235  case 8:
1236  ret = new modef(ds1, ds2, var_ds1, var_ds2, outfile, outprefix);
1237  break;
1238 */
1239  default:
1240  ret = NULL;
1241  break;
1242 
1243  }
1244 
1245  return ret;
1246 
1247 }
Definition: metric.h:35

Here is the caller graph for this function:

void print_metrics ( )

Sample Correlation Coefficient.

Get the average of the var_ds1 variable in dataset 1

Returns
Average value Get the average of the var_ds2 variable in dataset2
Average value Modelling Efficiency

Definition at line 1161 of file metric.cpp.

References i.

Referenced by printUsage().

1161  {
1162 
1163  int i=0;
1164 
1165  ofstream unset;
1166  string nullstr("");
1167 /*
1168  mse one(NULL, NULL, -1, -1, unset, nullstr);
1169  cout<<"\t"<<++i<<": "<<one.get_metric_name()<<"\n";
1170 
1171  rmse two(NULL, NULL, -1, -1, unset, nullstr);
1172  cout<<"\t"<<++i<<": "<<two.get_metric_name()<<"\n";
1173 
1174  scc three(NULL, NULL, -1, -1, unset, nullstr);
1175  cout<<"\t"<<++i<<": "<<three.get_metric_name()<<"\n";
1176 
1177  difmap four(NULL, NULL, -1, -1, unset, nullstr);
1178  cout<<"\t"<<++i<<": "<<four.get_metric_name()<<"\n";
1179 
1180  difmap_wkey five(NULL, NULL, -1, -1, unset, nullstr);
1181  cout<<"\t"<<++i<<": "<<five.get_metric_name()<<"\n";
1182 
1183  colmap six(NULL, NULL, -1, -1, unset, nullstr);
1184  cout<<"\t"<<++i<<": "<<six.get_metric_name()<<"\n";
1185 
1186  scorco seven(NULL, NULL, -1, -1, unset, nullstr);
1187  cout<<"\t"<<++i<<": "<<seven.get_metric_name()<<"\n";
1188 
1189  modef eight(NULL, NULL, -1, -1, unset, nullstr);
1190  cout<<"\t"<<++i<<": "<<eight.get_metric_name()<<"\n";
1191 */
1192 }
blockLoc i
Definition: read.cpp:79

Here is the caller graph for this function: