return (connectedComponents(P).size() == 1);
}
public List<IIntArray> connectedComponents(IDoubleArray P)
{
IIntGraph g = new MatrixIntGraph(P);
IntStrongConnectivity connectivity = new IntStrongConnectivity(g);
connectivity.perform();
List<IIntArray> C = connectivity.getStrongComponents();
return C;