Exemple #1
0
// plot all points without binning
void PlotPoints(const TFltPrV& in, const TFltPrV& out, const TStr& name, const TStr& Plt){
    if (Plt == "noncum" || Plt == "all"){
        SaveDegree(in, name, true, false);
        SaveDegree(out, name, false, false);
    }
    if (Plt == "cum" || Plt == "all"){
        SaveDegree(in, name, true, true);
        SaveDegree(out, name, false, true);
    }
}
Exemple #2
0
void SaveSparse(const TFltPrV& G, const int& BinRadix, bool isIn, const TStr&name, bool isCum){
	TFltPrV deg(G), degSparse;
	if (isCum){
		deg.Clr();
		GetCumDistr(G, deg);
	}
	//GetPoints(maxLog, minLog, NInt, deg, degSparse);
	ExpBinning(deg, degSparse, BinRadix);

	/*if (isCum){
	PrintDegDistr(G, "G.Tab");
	PrintDegDistr(deg, "degTest.Tab");
	PrintDegDistr(degSparse, "degSparseTest.Tab");
	}*/
	//printf("%s: Nodes %d, edges %d\n", name.CStr(), nodes, edges);
	SaveDegree(degSparse, name, isIn, isCum);
}