Skip to content

Commit abaf556

Browse files
authored
Merge pull request #119 from n8sh/spelling
Spelling fixes
2 parents 163d5b3 + 9bfe656 commit abaf556

File tree

15 files changed

+45
-42
lines changed

15 files changed

+45
-42
lines changed

source/mir/array/primitives.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Range primitives for arrays with multi-dimensional like API support.
33
44
Note:
55
UTF strings behaves like common arrays in Mir.
6-
`std.uni.byCodePoint` can be used to creat a range of chararacters.
6+
`std.uni.byCodePoint` can be used to create a range of characters.
77
88
See_also: $(MREF mir,_primitives).
99

source/mir/functional.d

+7-7
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ alias tuple = refTuple;
119119
/++
120120
Returns: a $(LREF RefTuple) structure.
121121
122-
If an argument is accessable by reference, then its pointer is stored instead.
122+
If an argument is accessible by reference, then its pointer is stored instead.
123123
124-
Use refTuple in combintation with $(LREF unref) to make a completely value tuple.
124+
Use refTuple in combination with $(LREF unref) to make a completely value tuple.
125125
+/
126126
RefTuple!Args refTuple(Args...)(auto ref Args args)
127127
{
@@ -345,7 +345,7 @@ version(mir_test) unittest
345345
assert(&naryFun!("a")(a) == &a);
346346
}
347347

348-
/// `args` paramter tuple
348+
/// `args` parameter tuple
349349
version(mir_test) unittest
350350
{
351351
assert(naryFun!("args[0] + args[1]")(2, 3) == 5);
@@ -748,10 +748,10 @@ template aliasCall(string methodName, TemplateArgs...)
748748
S s;
749749

750750
auto sfun = aliasCall!"fun"(s);
751-
assert(3.iota.vmap(sfun) == io + 1); // opCall is overloded
752-
assert(3.iota.map!sfun == io + 1); // opCall is overloded
751+
assert(3.iota.vmap(sfun) == io + 1); // opCall is overloaded
752+
assert(3.iota.map!sfun == io + 1); // opCall is overloaded
753753

754754
auto sfun10 = aliasCall!("fun", 10)(s); // uses fun!10
755-
assert(3.iota.vmap(sfun10) == io + 10); // opCall is overloded
756-
assert(3.iota.map!sfun10 == io + 10); // opCall is overloded
755+
assert(3.iota.vmap(sfun10) == io + 10); // opCall is overloaded
756+
assert(3.iota.map!sfun10 == io + 10); // opCall is overloaded
757757
}

source/mir/internal/memory.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ version (Windows)
8181

8282
if (!ptr) return _aligned_malloc(size, alignment);
8383

84-
// gets the header from the exising pointer
84+
// gets the header from the existing pointer
8585
AlignInfo!()* head = AlignInfo!()(ptr);
8686

8787
// gets a new aligned pointer
@@ -93,7 +93,7 @@ version (Windows)
9393
return null;
9494
}
9595

96-
// copy exising data
96+
// copy existing data
9797
memcpy(alignedPtr, ptr, head.size);
9898
free(head.basePtr);
9999

source/mir/interpolate/constant.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Returns: $(LREF Constant)
6262
template constant(T, size_t N = 1, FirstGridIterator = immutable(T)*, NextGridIterators = Repeat!(N - 1, FirstGridIterator))
6363
if (is(T == Unqual!T) && N <= 6)
6464
{
65-
static if (N > 1) pragma(msg, "Warning: multivariate constant interplant was not tested.");
65+
static if (N > 1) pragma(msg, "Warning: multivariate constant interpolant was not tested.");
6666

6767
private alias GridIterators = AliasSeq!(FirstGridIterator, NextGridIterators);
6868
private alias GridVectors = Constant!(T, N, GridIterators).GridVectors;

source/mir/interpolate/linear.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ version(mir_test)
9191
assert(approxEqual(xs.sliced.map!interpolation, data, 1e-4, 1e-4));
9292
}
9393

94-
/// R^2 -> R: Bilinear interpolaiton
94+
/// R^2 -> R: Bilinear interpolation
9595
version(mir_test)
9696
@safe pure unittest
9797
{
@@ -133,7 +133,7 @@ version(mir_test)
133133
assert(appreq(d[1][1], y_x0x1));
134134
}
135135

136-
/// R^3 -> R: Trilinear interpolaiton
136+
/// R^3 -> R: Trilinear interpolation
137137
version(mir_test)
138138
@safe pure unittest
139139
{

source/mir/interpolate/spline.d

+12-12
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ version(mir_test)
198198
assert(approxEqual(xs.sliced.vmap(interpolation), data, 1e-4, 1e-4));
199199
}
200200

201-
/// R^2 -> R: Bicubic interpolaiton
201+
/// R^2 -> R: Bicubic interpolation
202202
version(mir_test)
203203
unittest
204204
{
@@ -252,7 +252,7 @@ unittest
252252
// assert(appreq(d[1][1], y_x0x1));
253253
}
254254

255-
/// R^3 -> R: Tricubic interpolaiton
255+
/// R^3 -> R: Tricubic interpolation
256256
version(mir_test)
257257
unittest
258258
{
@@ -336,38 +336,38 @@ template spline(T, size_t N = 1, FirstGridIterator = immutable(T)*, NextGridIter
336336
Params:
337337
grid = immutable `x` values for interpolant
338338
values = `f(x)` values for interpolant
339-
typeOfBondaries = $(LREF SplineBoundaryType) for both tails (optional).
340-
valueOfBondaryConditions = value of the boundary type (optional).
339+
typeOfBoundaries = $(LREF SplineBoundaryType) for both tails (optional).
340+
valueOfBoundaryConditions = value of the boundary type (optional).
341341
Constraints:
342342
`grid` and `values` must have the same length >= 3
343343
Returns: $(LREF Spline)
344344
+/
345345
Spline!(T, N, GridIterators) spline(SliceKind ykind, yIterator)(
346346
GridVectors grid,
347347
scope Slice!(ykind, [N], yIterator) values,
348-
SplineBoundaryType typeOfBondaries = SplineBoundaryType.notAKnot,
349-
in T valueOfBondaryConditions = 0,
348+
SplineBoundaryType typeOfBoundaries = SplineBoundaryType.notAKnot,
349+
in T valueOfBoundaryConditions = 0,
350350
)
351351
{
352-
return spline(grid, values, SplineBoundaryCondition!T(typeOfBondaries, valueOfBondaryConditions));
352+
return spline(grid, values, SplineBoundaryCondition!T(typeOfBoundaries, valueOfBoundaryConditions));
353353
}
354354

355355
/++
356356
Params:
357357
grid = immutable `x` values for interpolant
358358
values = `f(x)` values for interpolant
359-
bondaries = $(LREF SplineBoundaryCondition) for both tails.
359+
boundaries = $(LREF SplineBoundaryCondition) for both tails.
360360
Constraints:
361361
`grid` and `values` must have the same length >= 3
362362
Returns: $(LREF Spline)
363363
+/
364364
Spline!(T, N, GridIterators) spline(SliceKind ykind, yIterator)(
365365
GridVectors grid,
366366
scope Slice!(ykind, [N], yIterator) values,
367-
SplineBoundaryCondition!T bondaries,
367+
SplineBoundaryCondition!T boundaries,
368368
)
369369
{
370-
return spline(grid, values, bondaries, bondaries);
370+
return spline(grid, values, boundaries, boundaries);
371371
}
372372

373373
/++
@@ -486,7 +486,7 @@ struct Spline(F, size_t N = 1, FirstGridIterator = immutable(F)*, NextGridIterat
486486
assert(x.length >= 2, "cubic spline interpolant: minimal allowed length for the grid equals 2.");
487487
shape[i] = x.length;
488488
// assert(x.length == values.length!i, "grid[" ~ i.stringof ~
489-
// "].length shoud be equal to values.length!" ~ i.stringof ~ ".");
489+
// "].length should be equal to values.length!" ~ i.stringof ~ ".");
490490
}
491491

492492
auto data_ptr = cast(F[2 ^^ N]*) (alignedAllocate(F[2 ^^ N].sizeof * shape.iota.elementsCount + alignment, alignment) + alignment);
@@ -522,7 +522,7 @@ struct Spline(F, size_t N = 1, FirstGridIterator = immutable(F)*, NextGridIterat
522522

523523
/++
524524
Computes derivatives and stores them in `_data`.
525-
`_data` is assumeed to be preinitialized with function values filled in `F[2 ^^ N][0]`.
525+
`_data` is assumed to be preinitialized with function values filled in `F[2 ^^ N][0]`.
526526
Params:
527527
lbc = left boundary condition
528528
rbc = right boundary condition

source/mir/math/common.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/++
22
Common floating point math functions.
33
4-
This module has generic LLVM-oriented API compatable with all D compilers.
4+
This module has generic LLVM-oriented API compatible with all D compilers.
55
66
License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
77
Copyright: Copyright © 2016-, Ilya Yaroshenko
@@ -32,7 +32,7 @@ version(LDC)
3232
It is similar to $(LREF fastmath), but does not allow unsafe-fp-math.
3333
This flag does NOT force LDC to use the reciprocal of an argument rather than perform division.
3434
35-
This flag is defualt for string lambdas.
35+
This flag is default for string lambdas.
3636
3737
Note: Can be used with all compilers.
3838
+/

source/mir/math/numeric.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/++
2-
This module contains simple numric algorithms.
2+
This module contains simple numeric algorithms.
33
44
License: $(LINK2 http://boost.org/LICENSE_1_0.txt, Boost License 1.0).
55
@@ -50,7 +50,7 @@ struct Prod(T)
5050
}
5151

5252
/++
53-
Compute the product of the input range $(D r) using separate exponent accomulation.
53+
Compute the product of the input range $(D r) using separate exponent accumulation.
5454
+/
5555
Unqual!(ForeachType!Range) prod(Range)(Range r, ref long exp)
5656
if (isFloatingPoint!(ForeachType!Range))

source/mir/ndslice/concatenation.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private template _expose(size_t maxN, size_t dim)
5050
}
5151
else
5252
{
53-
static assert(s.shape.length == s.N, "Cannot create concatentaion for packed slice of smaller dimension.");
53+
static assert(s.shape.length == s.N, "Cannot create concatenation for packed slice of smaller dimension.");
5454
import mir.ndslice.topology: repeat, unpack;
5555
auto r = s.repeat(1).unpack;
5656
static if (dim)

source/mir/ndslice/connect/cpython.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import std.traits;
2020

2121
/++
2222
Construct flags for $(PGB).
23-
If `T` is not `const` or `immutable` then the flags requrie writable buffer.
23+
If `T` is not `const` or `immutable` then the flags require writable buffer.
2424
If slice kind is $(SUBREF slice, Contiguous) then the flags require $(LINK2 https://docs.python.org/3/c-api/buffer.html#contiguity-requests, c_contiguous) buffer.
2525
2626
Params:
@@ -95,7 +95,7 @@ Params:
9595
view = output $(LREF Py_buffer).
9696
$(LREF Py_buffer.internal) is initialized with null value,
9797
$(LREF Py_buffer.obj) is not initialized.
98-
Other $(LREF Py_buffer) fields are initialized accroding to the flags and slice.
98+
Other $(LREF Py_buffer) fields are initialized according to the flags and slice.
9999
flags = requester flags
100100
structureBuffer = Single chunk of memory with the same alignment and size as $(SUBREF _slice, Structure).
101101
The buffer is used to store shape and strides for the view.

source/mir/ndslice/dynamic.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $(TR $(TH Function Name) $(TH Description))
3636
$(T2 rotated, Rotates two selected dimensions by `k*90` degrees. $(BR)
3737
`iota(2, 3).rotated` equals to `[[2, 5], [1, 4], [0, 3]]`.)
3838
$(T2 dropToHypercube, Returns maximal multidimensional cube of a slice.)
39-
$(T2 normalizeStructure, Reverses iteration order for dimensions with nagative strides, they become not negative;
39+
$(T2 normalizeStructure, Reverses iteration order for dimensions with negative strides, they become not negative;
4040
and sorts dimensions according to the strides, dimensions with larger strides are going first.)
4141
)
4242
@@ -90,7 +90,7 @@ import mir.utility;
9090
@optmath:
9191

9292
/++
93-
Reverses iteration order for dimensions with nagative strides, they become not negative;
93+
Reverses iteration order for dimensions with negative strides, they become not negative;
9494
and sorts dimensions according to the strides, dimensions with larger strides are going first.
9595
9696
Params:

source/mir/ndslice/field.d

+5-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ struct MapField(Field, alias fun)
7878
return _field.shape;
7979
}
8080

81-
auto elemenstCount()() @property
81+
auto elementsCount()() @property
8282
{
83-
return _field.elemenstCount;
83+
return _field.elementsCount;
8484
}
85+
86+
deprecated("this is a misspelling of 'elementsCount'")
87+
alias elemenstCount() = elementsCount!();
8588
}
8689

8790
/++

source/mir/ndslice/slice.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ struct Slice(SliceKind kind, size_t[] packs, Iterator)
765765
private alias ImmutableThis = Slice!(kind, packs, immutable(Unqual!(PointerTarget!Iterator))*);
766766

767767
/++
768-
Cast to const and immutable slices in case of underlaying range is a pointer.
768+
Cast to const and immutable slices in case of underlying range is a pointer.
769769
+/
770770
ref toImmutable()() immutable @trusted pure nothrow @nogc
771771
{
@@ -2051,7 +2051,7 @@ struct Slice(SliceKind kind, size_t[] packs, Iterator)
20512051
Returns:
20522052
lazy slice the same shape that has $(LREF Contiguous) kind
20532053
Note:
2054-
Binary operator overloading is allowed if both slices are contigous or one-dimensional.
2054+
Binary operator overloading is allowed if both slices are contiguous or one-dimensional.
20552055
$(BR)
20562056
Does not allocate neither new slice nor a closure.
20572057
+/

source/mir/ndslice/topology.d

+3-3
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ version(mir_test) unittest
15001500

15011501
elems.popFrontExactly(2);
15021502
assert(elems.front == 2);
1503-
/// `_index` is availble only for canonical and universal ndslices.
1503+
/// `_index` is available only for canonical and universal ndslices.
15041504
assert(elems._iterator._indexes == [0, 2]);
15051505

15061506
elems.popBackExactly(2);
@@ -2142,7 +2142,7 @@ version(mir_test) unittest
21422142
/++
21432143
Bytegroup slice over an integral slice.
21442144
2145-
Groups exisinting slice into fixed length chunks and uses them as data store for destination type.
2145+
Groups existing slice into fixed length chunks and uses them as data store for destination type.
21462146
21472147
Correctly handles scalar types on both little-endian and big-endian platforms.
21482148
@@ -2831,7 +2831,7 @@ Pairwise map for vectors.
28312831
Works with packed slices.
28322832
28332833
Params:
2834-
fun = function to accomulate
2834+
fun = function to accumulate
28352835
lag = an integer indicating which lag to use
28362836
Returns: lazy ndslice composed of `fun(a_n, a_n+1)` values.
28372837

source/mir/utility.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ unittest
596596
immutable a = 0x93_8d_28_00_0f_50_a5_56;
597597
immutable b = 0x54_c3_2f_e8_cc_a5_97_10;
598598
enum c = extMul(a, b); // Compile time algorithm
599-
assert(extMul(a, b) == c); // Fast runtime algorihtm
599+
assert(extMul(a, b) == c); // Fast runtime algorithm
600600
static assert(c.high == 0x30_da_d1_42_95_4a_50_78);
601601
static assert(c.low == 0x27_9b_4b_b4_9e_fe_0f_60);
602602
}

0 commit comments

Comments
 (0)