Skip to content

Commit b0eac25

Browse files
Merge pull request #492 from ChrisRackauckas-Claude/docs-improvements-20251230-070836
Documentation improvements: Fix grammar and typos
2 parents 6b09a9f + c531afa commit b0eac25

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interp(u′, t′)
4343

4444
## Available Interpolations
4545

46-
In all cases, `u` an `AbstractVector` of values and `t` is an `AbstractVector` of timepoints
46+
In all cases, `u` is an `AbstractVector` of values and `t` is an `AbstractVector` of timepoints
4747
corresponding to `(u,t)` pairs.
4848

4949
- `ConstantInterpolation(u,t)` - A piecewise constant interpolation.
@@ -67,7 +67,7 @@ corresponding to `(u,t)` pairs.
6767

6868
## Extension Methods
6969

70-
The follow methods require extra dependencies and will be loaded as package extensions.
70+
The following methods require extra dependencies and will be loaded as package extensions.
7171

7272
- `Curvefit(u,t,m,p,alg)` - An interpolation which is done by fitting a user-given functional form `m(t,p)` where `p` is the vector of parameters. The user's input `p` is a an initial value for a least-square fitting, `alg` is the algorithm choice to use for optimize the cost function (sum of squared deviations) via `Optim.jl` and optimal `p`s are used in the interpolation. Requires `using Optim`.
7373
- `RegularizationSmooth(u,t,d;λ,alg)` - A regularization algorithm (ridge regression) which is done by minimizing an objective function (l2 loss + derivatives of order `d`) integrated in the time span. It is a global method and creates a smooth curve.

docs/src/extrapolation_methods.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,33 @@ This extrapolation type extends the interpolation with a continuation of the exp
4848
```@example tutorial
4949
A = QuadraticSpline(u, t; extrapolation = ExtrapolationType.Extension)
5050
plot(A)
51-
plot!(t_eval_left, A.(t_eval_left); label = "extrapolation down")
52-
plot!(t_eval_right, A.(t_eval_right); label = "extrapolation up")
51+
plot!(t_eval_left, A.(t_eval_left); label = "extrapolation left")
52+
plot!(t_eval_right, A.(t_eval_right); label = "extrapolation right")
5353
```
5454

5555
## `ExtrapolationType.Periodic`
5656

57-
this extrapolation type extends the interpolation such that `A(t + T) == A(t)` for all `t`, where the period is given by `T = last(A.t) - first(A.t)`.
57+
This extrapolation type extends the interpolation such that `A(t + T) == A(t)` for all `t`, where the period is given by `T = last(A.t) - first(A.t)`.
5858

5959
```@example tutorial
6060
T = last(A.t) - first(A.t)
6161
t_eval_left = range(first(t) - 2T, first(t), length = 100)
6262
t_eval_right = range(last(t), last(t) + 2T, length = 100)
6363
A = QuadraticSpline(u, t; extrapolation = ExtrapolationType.Periodic)
6464
plot(A)
65-
plot!(t_eval_left, A.(t_eval_left); label = "extrapolation down")
66-
plot!(t_eval_right, A.(t_eval_right); label = "extrapolation up")
65+
plot!(t_eval_left, A.(t_eval_left); label = "extrapolation left")
66+
plot!(t_eval_right, A.(t_eval_right); label = "extrapolation right")
6767
```
6868

6969
## `ExtrapolationType.Reflective`
7070

71-
this extrapolation type extends the interpolation such that `A(t_ + t) == A(t_ - t)` for all `t_, t` such that `(t_ - first(A.t)) % T == 0` and `0 < t < T`, where `T = last(A.t) - first(A.t)`.
71+
This extrapolation type extends the interpolation such that `A(t_ + t) == A(t_ - t)` for all `t_, t` such that `(t_ - first(A.t)) % T == 0` and `0 < t < T`, where `T = last(A.t) - first(A.t)`.
7272

7373
```@example tutorial
7474
A = QuadraticSpline(u, t; extrapolation = ExtrapolationType.Reflective)
7575
plot(A)
76-
plot!(t_eval_left, A.(t_eval_left); label = "extrapolation down")
77-
plot!(t_eval_right, A.(t_eval_right); label = "extrapolation up")
76+
plot!(t_eval_left, A.(t_eval_left); label = "extrapolation left")
77+
plot!(t_eval_right, A.(t_eval_right); label = "extrapolation right")
7878
```
7979

8080
## Mixed extrapolation

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Pkg.add("DataInterpolations")
1313

1414
## Available Interpolations
1515

16-
In all cases, `u` an `AbstractVector` of values and `t` is an `AbstractVector` of timepoints
16+
In all cases, `u` is an `AbstractVector` of values and `t` is an `AbstractVector` of timepoints
1717
corresponding to `(u,t)` pairs.
1818

1919
- `ConstantInterpolation(u,t)` - A piecewise constant interpolation.

docs/src/interface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ out_matrix
9292

9393
## Derivatives
9494

95-
Derivatives of the interpolated curves can also be computed at any point for all the methods. Derivatives upto second order is supported where first order derivative is computed analytically and second order using `ForwardDiff.jl`. Order is passed as the third argument. It is 1 by default.
95+
Derivatives of the interpolated curves can also be computed at any point for all the methods. Derivatives up to second order are supported where first order derivative is computed analytically and second order using `ForwardDiff.jl`. Order is passed as the third argument. It is 1 by default.
9696

9797
We will continue with the above example, but the API is the same for all the methods. If the interpolation is defined with `extrapolate=true`, derivatives can also be extrapolated.
9898

@@ -135,5 +135,5 @@ DataInterpolations.integral(A2, 200.0, 300.0)
135135
```
136136

137137
!!! note
138-
139-
If the times provided in the integral go beyond the range of the time points provided during interpolation, it uses extrapolation methods to compute the values, and hence the integral can be misrepsentative and might not reflect the true nature of the data.
138+
139+
If the times provided in the integral go beyond the range of the time points provided during interpolation, it uses extrapolation methods to compute the values, and hence the integral can be misrepresentative and might not reflect the true nature of the data.

0 commit comments

Comments
 (0)