Skip to content

Commit

Permalink
getindex for weight vector
Browse files Browse the repository at this point in the history
  • Loading branch information
lindahua committed Jun 13, 2014
1 parent 2edb2ca commit 338b939
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/weights.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ values(wv::WeightVec) = wv.values
sum(wv::WeightVec) = wv.sum
isempty(wv::WeightVec) = isempty(wv.values)

Base.getindex(wv::WeightVec, i) = getindex(wv.values, i)


##### Weighted sum #####

Expand Down

0 comments on commit 338b939

Please sign in to comment.