Skip to content

Commit

Permalink
Merge pull request #4 from timbitz/master
Browse files Browse the repository at this point in the history
update for Julia 0.5
  • Loading branch information
quinnj authored May 22, 2017
2 parents b6cc5b8 + 21cf410 commit d534e1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sais.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type IntArray
pos::Int
end
import Base: getindex, setindex!
getindex(a::IntArray,key) = a.a[a.pos + key]
setindex!(a::IntArray,value,key) = a.a[a.pos + key] = value
getindex(a::IntArray,key) = a.a[a.pos + Int(key)]
setindex!(a::IntArray,value,key) = a.a[a.pos + Int(key)] = value

# "banana" = [5 3 1 0 4 2]
# "banana" = [6, 4, 2, 1, 5, 3]
Expand Down Expand Up @@ -256,7 +256,7 @@ function LMSsort(T, SA, C, B, n, k)
for i = n:-1:1
if 0 < (j = SA[i])
c0 = T[j+1]
if c0 != c1
if Int(c0) != Int(c1)
B[c1+1] = b
c1 = c0
b = B[Int(c1)+1]
Expand Down

0 comments on commit d534e1b

Please sign in to comment.