Showing 1 of 1 files from the diff.

@@ -39,18 +39,20 @@
Loading
39 39
        gap <- 0
40 40
        for(i in 1:comps$no){
41 41
            g1 <- igraph::induced_subgraph(g,which(comps$membership==i))
42 -
            n <- igraph::vcount(g)
43 -
            deg.sorted <- sort(igraph::degree(g1), decreasing = TRUE)
44 -
            deg.cor <- sapply(1:n, function(k) {
45 -
                length(which(deg.sorted[which((1:n) < k)] >= (k - 1))) + length(which(deg.sorted[which((1:n) > k)] >= k))
46 -
            })
47 -
            gap1 <- deg.cor - deg.sorted
48 -
            if (!norm) {
49 -
                gap1 <- 0.5 * sum(gap1[gap1 >= 0])
50 -
            } else {
51 -
                gap1 <- 0.5 * sum(gap1[gap1 >= 0])/igraph::ecount(g1)
42 +
            if(igraph::ecount(g1)!=0){
43 +
                n <- igraph::vcount(g)
44 +
                deg.sorted <- sort(igraph::degree(g1), decreasing = TRUE)
45 +
                deg.cor <- sapply(1:n, function(k) {
46 +
                    length(which(deg.sorted[which((1:n) < k)] >= (k - 1))) + length(which(deg.sorted[which((1:n) > k)] >= k))
47 +
                })
48 +
                gap1 <- deg.cor - deg.sorted
49 +
                if (!norm) {
50 +
                    gap1 <- 0.5 * sum(gap1[gap1 >= 0])
51 +
                } else {
52 +
                    gap1 <- 0.5 * sum(gap1[gap1 >= 0])/igraph::ecount(g1)
53 +
                }
54 +
                gap <- gap+gap1
52 55
            }
53 -
            gap <- gap+gap1
54 56
        }
55 57
    } else{
56 58
        n <- igraph::vcount(g)
Files Coverage
R 60.96%
src 95.25%
Project Totals (39 files) 73.77%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading