all: fix typos

This commit is contained in:
Dan Kortschak
2025-01-01 07:21:09 +10:30
parent ca6b5f46d4
commit f42c07e8cb
11 changed files with 16 additions and 14 deletions

View File

@@ -43,7 +43,7 @@ The current list of non-internal tags is as follows:
- safe — do not use assembly or unsafe
- bounds — use bounds checks even in internal calls
- noasm — do not use assembly implementations
- tomita — use [Tomita, Tanaka, Takahashi pivot choice](https://doi.org/10.1016%2Fj.tcs.2006.06.015) for maximimal clique calculation, otherwise use random pivot (only in [topo package](https://pkg.go.dev/gonum.org/v1/gonum/graph/topo))
- tomita — use [Tomita, Tanaka, Takahashi pivot choice](https://doi.org/10.1016%2Fj.tcs.2006.06.015) for maximal clique calculation, otherwise use random pivot (only in [topo package](https://pkg.go.dev/gonum.org/v1/gonum/graph/topo))
## Issues [![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/gonum/gonum)](https://www.tickgit.com/browse?repo=github.com/gonum/gonum)

View File

@@ -54,13 +54,13 @@ func ExampleModularExt_subgraphIsomorphism() {
// Make a graph for the query pattern: a love triangle.
pattern := simple.NewDirectedGraph()
for _, relationsip := range []simple.WeightedEdge{
for _, relationship := range []simple.WeightedEdge{
{F: person{name: "A", id: -1}, T: person{name: "B", id: -2}, W: 1},
{F: person{name: "B", id: -2}, T: person{name: "A", id: -1}, W: 1},
{F: person{name: "C", id: -3}, T: person{name: "A", id: -1}, W: -1},
{F: person{name: "C", id: -3}, T: person{name: "B", id: -2}, W: 1},
} {
pattern.SetEdge(relationsip)
pattern.SetEdge(relationship)
}
// Produce the modular product of the two graphs.

View File

@@ -118,7 +118,7 @@ func TestCap(t *testing.T) {
} {
got := test.vector.Cap()
if got != test.want {
t.Errorf("unexpected capacty for test %d: got: %d want: %d", i, got, test.want)
t.Errorf("unexpected capacity for test %d: got: %d want: %d", i, got, test.want)
}
}
}

View File

@@ -18,7 +18,7 @@ import "gonum.org/v1/gonum/mathext/internal/gonum"
// B(a,b) returns NaN if a or b is < 0
// B(a,b) returns +Inf if a xor b is 0.
//
// See http://mathworld.wolfram.com/BetaFunction.html for more detailed informations.
// See http://mathworld.wolfram.com/BetaFunction.html for more detailed information.
func Beta(a, b float64) float64 {
return gonum.Beta(a, b)
}

View File

@@ -710,7 +710,7 @@ func (BrownAndDennis) Minima() []Minimum {
//
// References:
// - Spedicato E.: Computational experience with quasi-Newton algorithms for
// minimization problems of moderatly large size. Towards Global
// minimization problems of moderately large size. Towards Global
// Optimization 2 (1978), 209-219
// - More, J., Garbow, B.S., Hillstrom, K.E.: Testing unconstrained
// optimization software. ACM Trans Math Softw 7 (1981), 17-41
@@ -1334,7 +1334,7 @@ func (PowellBadlyScaled) Minima() []Minimum {
//
// References:
// - Spedicato E.: Computational experience with quasi-Newton algorithms for
// minimization problems of moderatly large size. Towards Global
// minimization problems of moderately large size. Towards Global
// Optimization 2 (1978), 209-219
// - More, J., Garbow, B.S., Hillstrom, K.E.: Testing unconstrained
// optimization software. ACM Trans Math Softw 7 (1981), 17-41

View File

@@ -134,7 +134,7 @@ func (d *Dirichlet) Prob(x []float64) float64 {
return math.Exp(d.LogProb(x))
}
// Rand generates a random number according to the distributon.
// Rand generates a random number according to the distribution.
//
// If dst is not nil, the sample will be stored in-place into dst and returned,
// otherwise a new slice will be allocated first. If dst is not nil, it must

View File

@@ -18,9 +18,11 @@ type LogProber interface {
LogProb(x []float64) float64
}
// Rander generates a random number according to the distributon.
// Rander generates a random number according to the distribution.
//
// If the input is non-nil, len(x) must equal len(p) and the dimension of the distribution,
// otherwise Quantile will panic.
//
// If the input is nil, a new slice will be allocated and returned.
type Rander interface {
Rand(x []float64) []float64

View File

@@ -294,7 +294,7 @@ func (n *Normal) Quantile(dst, p []float64) []float64 {
return dst
}
// Rand generates a random sample according to the distributon.
// Rand generates a random sample according to the distribution.
//
// If dst is not nil, the sample will be stored in-place into dst and returned,
// otherwise a new slice will be allocated first. If dst is not nil, it must
@@ -303,7 +303,7 @@ func (n *Normal) Rand(dst []float64) []float64 {
return NormalRand(dst, n.mu, &n.chol, n.src)
}
// NormalRand generates a random sample from a multivariate normal distributon
// NormalRand generates a random sample from a multivariate normal distribution
// given by the mean and the Cholesky factorization of the covariance matrix.
//
// If dst is not nil, the sample will be stored in-place into dst and returned,

View File

@@ -331,7 +331,7 @@ func (s *StudentsT) Prob(y []float64) float64 {
return math.Exp(s.LogProb(y))
}
// Rand generates a random sample according to the distributon.
// Rand generates a random sample according to the distribution.
//
// If dst is not nil, the sample will be stored in-place into dst and returned,
// otherwise a new slice will be allocated first. If dst is not nil, it must

View File

@@ -155,7 +155,7 @@ func (u *Uniform) Prob(x []float64) float64 {
return math.Exp(u.LogProb(x))
}
// Rand generates a random sample according to the distributon.
// Rand generates a random sample according to the distribution.
//
// If dst is not nil, the sample will be stored in-place into dst and returned,
// otherwise a new slice will be allocated first. If dst is not nil, it must

View File

@@ -28,7 +28,7 @@ func TestHalton(t *testing.T) {
batch := mat.NewDense(test.n, test.d, nil)
Halton{Kind: Owen, Q: distmv.NewUnitUniform(test.d, nil), Src: src}.Sample(batch)
// In each dimension, the samples should be stratefied according to the
// In each dimension, the samples should be stratified according to the
// prime for that dimension. There should be at most 1 sample per
// 1/b^k block, where k is log(n)/log(b).
for d := 0; d < test.d; d++ {