main.cpp 1.08 KB
#include <stdlib.h>
#include <string>
#include <fstream>
#include <algorithm>
#include <stim/biomodels/network.h>

#include <ANN/ANN.h>
#include <boost/tuple/tuple.hpp>
using namespace stim;
//template <typename T>
network<float>* network1;


int main(int argc, char* argv[])
{
	if(argc < 4){
		std::cout<<"Please specify a ground truth and test case"<<std::endl;
		exit(1);
	}

	float resample_rate = 0.1;

	float sigma = atof(argv[3]);
	stim::network<float> GT;stim::network<float> T;
	// load obj files to 3D network class
	GT.load_obj(argv[1]);
	T.load_obj(argv[2]);

	// resample the loaded networks
	stim::network<float> resampled_GT;stim::network<float> resampled_T;

	resampled_GT = GT.resample(sigma * resample_rate);
	resampled_T = T.resample(sigma * resample_rate);

	// compare ground truth with truth and viceversa
	float gFPR, gFNR;
	gFPR = resampled_GT.compare(resampled_T, sigma);
    gFNR = resampled_T.compare(resampled_GT, sigma);
	// print false alarms and misses
	std::cout << "False postive rate is " << gFPR << std::endl;
	std::cout << "False negative rate is " << gFNR << std::endl;
}