R/print.ktsp.r

Defines functions print.ktsp

Documented in print.ktsp

print.ktsp <- function(x,...){
	ktspobj <- x
	cat(c("k-TSP object with:",ktspobj$k, "TSPs\n"))
	cat(c("Pair:\t\tTSP Score\t\tIndices\n"))
	for(i in 1:length(ktspobj$ktspscore)){
		cat(c("TSP",i,":","\t",round(ktspobj$ktspscore[i],2),"\t\t\t",ktspobj$index[i,],"\n"))
	}
}

Try the ktspair package in your browser

Any scripts or data that you put into this service are public.

ktspair documentation built on May 2, 2019, 3:25 a.m.