-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use Golang sort package - Now able to use custom weighing and scoring algorithm - Now use pagerank as default scoring algorithm - Update readme - Update test - Update benchmark
- Loading branch information
Showing
6 changed files
with
104 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Lucas just announced that Beijing-based MAD Architects will design the museum, while Chicago firm Studio Gang Architects will be responsible for the surrounding landscape and a pedestrian bridge that links nearby peninsula Northerly Island with the city. | ||
|
||
In honor of the Museum of Narrative Art and its star-studded cast of architects, here's a roundup of articles from Architizer that feature Star Wars-related architecture: | ||
|
||
Jeff Bennett's Wars on Kinkade are hilarious paintings that ravage the peaceful landscapes of Thomas Kinkade with the brutal destruction of Star Wars. | ||
|
||
Lucas just announced that Beijing-based MAD Architects will design the museum, while Chicago firm Studio Gang Architects will be responsible for the surrounding landscape and a pedestrian bridge that links nearby peninsula Northerly Island with the city. | ||
|
||
These products were inspired by the movie and blend pop culture memorabilia with high design, including Hans Solo Carbonite Coffee Tables, Emperor Thrones, and an AT-AT Triple Bunk Bed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package tldr | ||
|
||
type ByWeight []*Edge | ||
|
||
func (b ByWeight) Len() int { | ||
return len(b) | ||
} | ||
|
||
func (b ByWeight) Swap(i, j int) { | ||
b[i], b[j] = b[j], b[i] | ||
} | ||
|
||
func (b ByWeight) Less(i, j int) bool { | ||
return b[i].weight < b[j].weight | ||
} | ||
|
||
type ByScore []*Rank | ||
|
||
func (b ByScore) Len() int { | ||
return len(b) | ||
} | ||
|
||
func (b ByScore) Swap(i, j int) { | ||
b[i], b[j] = b[j], b[i] | ||
} | ||
|
||
func (b ByScore) Less(i, j int) bool { | ||
return b[i].score < b[j].score | ||
} | ||
|
||
func ReverseEdge(num []*Edge) { | ||
for i, j := 0, len(num)-1; i < j; i, j = i+1, j-1 { | ||
num[i], num[j] = num[j], num[i] | ||
} | ||
} | ||
|
||
func ReverseRank(num []*Rank) { | ||
for i, j := 0, len(num)-1; i < j; i, j = i+1, j-1 { | ||
num[i], num[j] = num[j], num[i] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.