#include <chain.ci>

using namespace javaSys;

int main (int argc, char **argv)
{
	ctl::vector<ctl::location> loc = ctl::readLocation("rsc.txt");
	for (int P=0; P<int(loc.size()); P++)
	{
		ctl::link lnk = loc[P];
		if (!lnk)
		{
			std::cout << "Could not create link -> " << loc[P].getSSH() << "\n";
			continue;
		}
		ChainCCI f(lnk);
		if (!f)
		{
			std::cout << "Could not create chainCI -> " << loc[P].getSSH() << "\n";
			continue;
		}
		double res = f.calcPI(3);
		std::cout << res << "\n";
	}
	return 0;
}
