Skip to content

Commit

Permalink
Age a bit slower.
Browse files Browse the repository at this point in the history
  • Loading branch information
rupa committed Aug 31, 2014
1 parent f0a71ca commit b620b0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README
Expand Up @@ -70,8 +70,8 @@ NOTES
Aging:
The rank of directories maintained by z undergoes aging based on a sim-
ple formula. The rank of each entry is incremented every time it is
accessed. When the sum of ranks is greater than 6000, all ranks are
multiplied by 0.99. Entries with a rank lower than 1 are forgotten.
accessed. When the sum of ranks is over 9000, all ranks are multiplied

This comment has been minimized.

Copy link
@solomonhawk

solomonhawk Nov 6, 2014

Bravo.

by 0.99. Entries with a rank lower than 1 are forgotten.

Frecency:
Frecency is a portmanteau of 'recent' and 'frequency'. It is a weighted
Expand Down
4 changes: 2 additions & 2 deletions z.1
Expand Up @@ -96,8 +96,8 @@ Install the provided man page \fBz.1\fR somewhere like \fB/usr/local/man/man1\fR
Aging:
The rank of directories maintained by \fBz\fR undergoes aging based on a simple
formula. The rank of each entry is incremented every time it is accessed. When
the sum of ranks is greater than 6000, all ranks are multiplied by 0.99. Entries
with a rank lower than 1 are forgotten.
the sum of ranks is over 9000, all ranks are multiplied by 0.99. Entries with a
rank lower than 1 are forgotten.
.SS
Frecency:
Frecency is a portmanteau of 'recent' and 'frequency'. It is a weighted rank
Expand Down
2 changes: 1 addition & 1 deletion z.sh
Expand Up @@ -69,7 +69,7 @@ _z() {
count += $2
}
END {
if( count > 6000 ) {
if( count > 9000 ) {
# aging
for( x in rank ) print x "|" 0.99*rank[x] "|" time[x]
} else for( x in rank ) print x "|" rank[x] "|" time[x]
Expand Down

0 comments on commit b620b0a

Please sign in to comment.