Skip to content

Commit

Permalink
[partition] Remove redundant edges
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Jan 26, 2018
1 parent 53cc240 commit 95ec665
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 60,465 deletions.
8 changes: 4 additions & 4 deletions partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ func (r *Partitioner) CountLinks() [][]int {
}

// Write the edge list
for i, a := range C {
for j, b := range a {
if b != 0 {
fmt.Printf("%s\t%s\t%d\n", refs[i].Name(), refs[j].Name(), b)
for i := 0; i < N; i++ {
for j := i + 1; j < N; j++ {
if C[i][j] != 0 {
fmt.Printf("%s\t%s\t%d\n", refs[i].Name(), refs[j].Name(), C[i][j])
}
}
}
Expand Down
Loading

0 comments on commit 95ec665

Please sign in to comment.