Skip to content

Commit

Permalink
Merge pull request JuliaCollections#849 from vaerksted/master
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
oxinabox committed Feb 27, 2023
2 parents 294c3ce + 7024b1d commit 98d47b6
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ v0.3.9 / 2015-05-03
v0.3.8 / 2015-04-18
===================

* Add special OrderedDict deprection for Numbers
* Add special OrderedDict deprecation for Numbers
* Fix warning about {A, B...}

v0.3.7 / 2015-04-17
Expand Down
6 changes: 3 additions & 3 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ julia --project=benchmark -e '

### To compare against baseline locally:

Note, must have a `baseline` branch, which will be the refrence point against the currently active branch. A common use case is to point the baseline to the previous commit.
Note, must have a `baseline` branch, which will be the reference point against the currently active branch. A common use case is to point the baseline to the previous commit.

This can be accomplished with
```
Expand All @@ -32,12 +32,12 @@ julia --project=benchmark -e '
### To compare against baseline locally (without re-running baseline):

Running the above baseline comparison produces a `benchmark/result-baseline.json` file which is
used as a refrence for new changes.
used as a reference for new changes.
If the baseline remains unchanged during development, then it is unnecessary to regenerate this file,
and the following command may be used to save benchmarking time.
```
julia --project=benchmark -e '
using Pkg; Pkg.instantiate();
include("benchmark/incrementalrunjudge.jl");
include("benchmark/pprintjudge.jl");'
```
```
2 changes: 1 addition & 1 deletion docs/src/heaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ DataStructures.nextreme(Base.Forward, n, a) # Equivalent to nsmallest(n, a)
One use case for custom orderings is to achieve faster performance with `Float`
elements with the risk of random ordering if any elements are `NaN`.
The provided `DataStructures.FasterForward` and `DataStructures.FasterReverse`
orderings are optimized for this purpose and may achive a 2x performance boost:
orderings are optimized for this purpose and may achieve a 2x performance boost:

```julia
h = BinaryHeap{Float64, DataStructures.FasterForward}() # faster min heap
Expand Down
6 changes: 3 additions & 3 deletions src/accumulator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Increments the count for `x` by `v` (defaulting to one)
inc!(ct::Accumulator, x, v::Number) = (ct[x] += v)
inc!(ct::Accumulator{T, V}, x) where {T, V} = inc!(ct, x, one(V))

# inc! is preferred over push!, but we need to provide push! for the Bag interpreation
# inc! is preferred over push!, but we need to provide push! for the Bag interpretation
# which is used by classified_collections.jl
Base.push!(ct::Accumulator, x) = inc!(ct, x)
Base.push!(ct::Accumulator, x, a::Number) = inc!(ct, x, a)
Expand Down Expand Up @@ -221,10 +221,10 @@ function Base.union!(a::Accumulator, b::Accumulator)
end


Base.intersect(a::Accumulator, b::Accumulator, c::Accumulator...) = insersect(intersect(a,b), c...)
Base.intersect(a::Accumulator, b::Accumulator, c::Accumulator...) = intersect(intersect(a,b), c...)
Base.intersect(a::Accumulator, b::Accumulator) = intersect!(copy(a), b)
function Base.intersect!(a::Accumulator, b::Accumulator)
for k in union(keys(a), keys(b)) # union not interection as we want to check both multiplicities
for k in union(keys(a), keys(b)) # union not intersection as we want to check both multiplicities
va = a[k]
vb = b[k]
va >= 0 || throw(MultiplicityException(k, va))
Expand Down
2 changes: 1 addition & 1 deletion src/avl_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ end
Returns the rank of `key` present in the `tree`, if it present. A `KeyError` is thrown if `key`
is not present.
# Exemples
# Examples
```jldoctest
julia> tree = AVLTree{Int}();
Expand Down
2 changes: 1 addition & 1 deletion src/priorityqueue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ end
# Construction inferring Key/Value types from input
# e.g. PriorityQueue{}

PriorityQueue(o1::Ordering, o2::Ordering) = throw(ArgumentError("PriorityQueue with two parameters must be called with an Ordering and an interable of pairs"))
PriorityQueue(o1::Ordering, o2::Ordering) = throw(ArgumentError("PriorityQueue with two parameters must be called with an Ordering and an iterable of pairs"))
PriorityQueue(kv, o::Ordering=Forward) = PriorityQueue(o, kv)
function PriorityQueue(o::Ordering, kv)
try
Expand Down
2 changes: 1 addition & 1 deletion src/queue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Create a `Queue` object containing elements of type `T` for First In, First Out
# Parameters
- `T::Type` Queue element data type.
- `blksize::Integer=1024` Unrolled linked-list bleck size (in bytes). Defualt = 1024.
- `blksize::Integer=1024` Unrolled linked-list block size (in bytes). Default = 1024.
# Examples
```jldoctest
Expand Down
4 changes: 2 additions & 2 deletions src/sorted_dict.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## A SortedDict is a wrapper around balancedTree with methods similiar
## A SortedDict is a wrapper around balancedTree with methods similar
## to those of Julia container Dict.

mutable struct SortedDict{K, D, Ord <: Ordering} <: AbstractDict{K,D}
Expand Down Expand Up @@ -179,7 +179,7 @@ end
"""
Base.push!(sd::SortedDict, p::Pair)
Insert key-vaue pair `p`, i.e., a `k=>v` pair, into `sd`.
Insert key-value pair `p`, i.e., a `k=>v` pair, into `sd`.
If the key `k` is already present, this overwrites the old value.
The key is also overwritten (not necessarily a no-op, since
sort-order equivalence may differ from equality).
Expand Down
2 changes: 1 addition & 1 deletion src/sorted_set.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## A SortedSet is a wrapper around balancedTree with
## methods similiar to those of the julia Set.
## methods similar to those of the julia Set.

mutable struct SortedSet{K, Ord <: Ordering} <: AbstractSet{K}
bt::BalancedTree23{K,Nothing,Ord}
Expand Down

0 comments on commit 98d47b6

Please sign in to comment.