Commit Graph

6300 Commits

Author SHA1 Message Date
Sebastien Binet
1ca563a018 all: bump x/{exp,image,mod,text,tools} and go-{fonts,latex}
Signed-off-by: Sebastien Binet <binet@cern.ch>
2024-09-04 08:31:37 +02:00
Jonathan Bluett-Duncan
bdcda9a453 graph: use slices package for sorting and reversing slices v0.15.1 2024-08-17 08:41:18 +09:30
Tristan Nicholls
a9b228ed6b A+C: add Tristan Nicholls 2024-08-17 06:04:00 +09:30
Tristan Nicholls
1f29d7b1d1 mat: calculate Q elements lazily when calling QR.At
When a matrix is very tall, calculating Q will currently allocate a
large Q at the end of the factorisation, even if it is not going to be
used, and a large Q matrix can lead to out of memory issues.

For this reason, Q is never eagerly computed unless explicitly required
to by the user, with QR.ToQ.
To keep fulfilling the Matrix interface, the QR.At method will compute
the requested element only, which only require computing a single row of
Q.
2024-08-17 06:04:00 +09:30
Tristan Nicholls
f1a62e187e mat: fix dst matrix shape check in QR.RTo
Fixed a typo in row/column size check, the
expected row size was incorrectly checked against
the column size.
2024-08-17 06:04:00 +09:30
Dan Kortschak
4cb1c6f4a8 ci,mod: update to go1.23 2024-08-16 15:44:07 +09:30
Dirk Mueller
0c62273e33 A+C: add Dirk Müller 2024-07-05 09:03:58 +02:00
Tom Payne
0efa2841bf A+C: add Tom Payne 2024-06-14 06:09:55 +09:30
Tom Payne
f48364e31d interp: increase speed of findSegment
Using slices.BinarySearch instead of sort.Search increases the speed of
findSegment by a factor of two and overall performance by about 30%.

goos: linux
goarch: amd64
pkg: gonum.org/v1/gonum/interp
cpu: AMD Ryzen 7 5800 8-Core Processor
                            │  old.bench   │              new.bench              │
                            │    sec/op    │   sec/op     vs base                │
FindSegment-16                104.60n ± 1%   50.78n ± 1%  -51.45% (p=0.000 n=10)
NewPiecewiseLinear-16          114.5n ± 5%   112.2n ± 2%        ~ (p=0.109 n=10)
PiecewiseLinearPredict-16     116.00n ± 1%   84.44n ± 2%  -27.21% (p=0.000 n=10)
PiecewiseConstantPredict-16    87.95n ± 2%   63.93n ± 1%  -27.31% (p=0.000 n=10)
geomean                        105.2n        74.47n       -29.18%
2024-06-14 06:08:53 +09:30
argusdusty
1dd194f95b stat/distuv: correct Gamma Mode doc comment 2024-06-12 18:09:49 +09:30
argusdusty
35bb474ac5 stat/distuv: correct Gamma Mode() and LogProb(0)/Prob(0) for alpha <= 1 2024-06-12 18:09:49 +09:30
Dan Kortschak
2bef024c93 graph/iterator: improve reflect-based iterators
- use SetIterValue to reduce allocations
- use explicit stored iterator length

goos: linux
goarch: amd64
pkg: gonum.org/v1/gonum/graph/traverse
cpu: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
                                    │  old.bench  │              new.bench              │
                                    │   sec/op    │   sec/op     vs base                │
WalkAllBreadthFirstGnp_10_tenth-8     3.575µ ± 2%   2.961µ ± 2%  -17.18% (p=0.000 n=20)
WalkAllBreadthFirstGnp_100_tenth-8    144.4µ ± 1%   132.4µ ± 1%   -8.33% (p=0.000 n=20)
WalkAllBreadthFirstGnp_1000_tenth-8   12.66m ± 2%   12.00m ± 2%   -5.20% (p=0.000 n=20)
WalkAllBreadthFirstGnp_10_half-8      8.415µ ± 1%   7.615µ ± 1%   -9.51% (p=0.000 n=20)
WalkAllBreadthFirstGnp_100_half-8     628.0µ ± 1%   580.7µ ± 1%   -7.54% (p=0.000 n=20)
WalkAllBreadthFirstGnp_1000_half-8    58.74m ± 1%   55.79m ± 2%   -5.03% (p=0.000 n=20)
WalkAllDepthFirstGnp_10_tenth-8       3.539µ ± 2%   2.956µ ± 1%  -16.49% (p=0.000 n=20)
WalkAllDepthFirstGnp_100_tenth-8      144.8µ ± 2%   135.5µ ± 1%   -6.40% (p=0.000 n=20)
WalkAllDepthFirstGnp_1000_tenth-8     12.40m ± 1%   12.02m ± 1%   -3.10% (p=0.000 n=20)
WalkAllDepthFirstGnp_10_half-8        8.210µ ± 1%   7.423µ ± 1%   -9.59% (p=0.000 n=20)
WalkAllDepthFirstGnp_100_half-8       625.8µ ± 1%   598.3µ ± 1%   -4.40% (p=0.000 n=20)
WalkAllDepthFirstGnp_1000_half-8      58.28m ± 1%   55.65m ± 1%   -4.52% (p=0.000 n=20)
geomean                               353.9µ        324.8µ        -8.21%

                                    │   old.bench   │              new.bench               │
                                    │     B/op      │     B/op       vs base               │
WalkAllBreadthFirstGnp_10_tenth-8      1.533Ki ± 0%    1.486Ki ± 0%  -3.06% (p=0.000 n=20)
WalkAllBreadthFirstGnp_100_tenth-8     29.58Ki ± 0%    29.61Ki ± 0%  +0.11% (p=0.000 n=20)
WalkAllBreadthFirstGnp_1000_tenth-8   1016.3Ki ± 0%   1016.4Ki ± 0%       ~ (p=0.199 n=20)
WalkAllBreadthFirstGnp_10_half-8       2.689Ki ± 0%    2.721Ki ± 0%  +1.16% (p=0.000 n=20)
WalkAllBreadthFirstGnp_100_half-8      61.44Ki ± 0%    61.47Ki ± 0%  +0.05% (p=0.000 n=20)
WalkAllBreadthFirstGnp_1000_half-8     4.036Mi ± 0%    4.036Mi ± 0%       ~ (p=0.080 n=20)
WalkAllDepthFirstGnp_10_tenth-8        1.533Ki ± 0%    1.486Ki ± 0%  -3.06% (p=0.000 n=20)
WalkAllDepthFirstGnp_100_tenth-8       29.58Ki ± 0%    29.61Ki ± 0%  +0.10% (p=0.000 n=20)
WalkAllDepthFirstGnp_1000_tenth-8      1.090Mi ± 1%    1.084Mi ± 1%       ~ (p=0.081 n=20)
WalkAllDepthFirstGnp_10_half-8         2.689Ki ± 0%    2.721Ki ± 0%  +1.16% (p=0.000 n=20)
WalkAllDepthFirstGnp_100_half-8        61.57Ki ± 0%    61.59Ki ± 0%  +0.04% (p=0.000 n=20)
WalkAllDepthFirstGnp_1000_half-8       6.279Mi ± 0%    6.167Mi ± 0%  -1.79% (p=0.000 n=20)
geomean                                58.77Ki         58.48Ki       -0.49%

                                    │  old.bench  │              new.bench              │
                                    │  allocs/op  │  allocs/op   vs base                │
WalkAllBreadthFirstGnp_10_tenth-8      27.00 ± 0%    17.00 ± 0%  -37.04% (p=0.000 n=20)
WalkAllBreadthFirstGnp_100_tenth-8    1.188k ± 0%   1.088k ± 0%   -8.42% (p=0.000 n=20)
WalkAllBreadthFirstGnp_1000_tenth-8   102.1k ± 0%   101.1k ± 0%   -0.98% (p=0.000 n=20)
WalkAllBreadthFirstGnp_10_half-8       70.00 ± 0%    60.00 ± 0%  -14.29% (p=0.000 n=20)
WalkAllBreadthFirstGnp_100_half-8     5.266k ± 0%   5.166k ± 0%   -1.90% (p=0.000 n=20)
WalkAllBreadthFirstGnp_1000_half-8    500.9k ± 0%   499.9k ± 0%   -0.20% (p=0.000 n=20)
WalkAllDepthFirstGnp_10_tenth-8        27.00 ± 0%    17.00 ± 0%  -37.04% (p=0.000 n=20)
WalkAllDepthFirstGnp_100_tenth-8      1.188k ± 0%   1.088k ± 0%   -8.42% (p=0.000 n=20)
WalkAllDepthFirstGnp_1000_tenth-8     102.1k ± 0%   101.1k ± 0%   -0.98% (p=0.000 n=20)
WalkAllDepthFirstGnp_10_half-8         70.00 ± 0%    60.00 ± 0%  -14.29% (p=0.000 n=20)
WalkAllDepthFirstGnp_100_half-8       5.266k ± 0%   5.166k ± 0%   -1.90% (p=0.000 n=20)
WalkAllDepthFirstGnp_1000_half-8      500.9k ± 0%   499.9k ± 0%   -0.20% (p=0.000 n=20)
geomean                               2.908k        2.572k       -11.54%
2024-05-24 20:49:39 +09:30
Dan Kortschak
f853624cb1 graph/iterator: allocate reflect map iterator inline 2024-05-17 20:05:25 +09:30
Jonathan Bluett-Duncan
e87aff1920 spatial: use generic lexical sorting routine 2024-05-11 21:57:13 +09:30
Jonathan Bluett-Duncan
fe73977b01 internal/order: move package from graph/internal/ordered and make function generic 2024-05-11 21:57:13 +09:30
Jonathan Bluett-Duncan
d0ddef96f2 stat: replace custom reverse logic with slices.Reverse 2024-05-11 21:50:29 +09:30
Jonathan Bluett-Duncan
7708557332 stat: add benchmarks for ROC 2024-05-11 21:50:29 +09:30
Jonathan Bluett-Duncan
5e83416a9c cmplxs: replace custom reverse logic with slices.Reverse 2024-05-08 21:29:40 +09:30
Jonathan Bluett-Duncan
87776495dd cmplxs: add benchmarks for Reverse 2024-05-08 21:29:40 +09:30
knowmost
9190f099c5 A+C: add Kendall Marcus 2024-05-02 05:29:16 +09:30
knowmost
459c4e17ac all: fix doc comments 2024-05-02 05:29:04 +09:30
Dan Kortschak
004477bd77 spatial/r3: make example test pass on arm64 2024-04-28 16:55:15 +09:30
Jonathan Bluett-Duncan
4c683c29b7 unit: use more efficient sort routine 2024-04-27 15:36:55 +09:30
Jonathan Bluett-Duncan
baa97e5a4c unit: add benchmarks for Dimensions.String 2024-04-27 15:36:55 +09:30
Jonathan Bluett-Duncan
b94e4828e9 graph: replace custom reverse logic with slices.Reverse 2024-04-27 15:34:24 +09:30
Jonathan Bluett-Duncan
1f5b2b5b54 graph: add benchmarks for AllShortest.(All)Between 2024-04-27 15:34:24 +09:30
Jonathan Bluett-Duncan
1bc1de45aa graph: add benchmarks for topo.Sort(Stabilized) 2024-04-27 15:34:24 +09:30
Dan Kortschak
affaa34094 all: fix doc comments identified by staticcheck
All complaints in mathext/internal are ignored, and an unfortunate naming
of methods in spatial/{r2,r3} is now permanent.
2024-04-23 17:11:29 +09:30
Dan Kortschak
7bd265b283 graph: clean up and fix implicit graph example
The From method incorrectly returned nil for the empty case and node neighbour
expansion did not mark visited nodes. Fix these and exercise the corrected path
in the test. Also clean up the code structure.
2024-04-19 05:41:38 +09:30
Jonathan Bluett-Duncan
1b7d9ca04a dsp: replace custom reverse logic with slices.Reverse 2024-04-14 06:06:16 +09:30
Jonathan Bluett-Duncan
cee1754e85 spatial: replace custom reverse logic with slices.Reverse 2024-04-14 06:02:42 +09:30
Jonathan Bluett-Duncan
219257751c graph: merge set.Ints and set.Int64s into one generic set 2024-04-07 08:10:32 +09:30
kindhuge
fcea26ecac A+C: add Huang Peng Fei
Signed-off-by: kindhuge <huangpengfei@outlook.com>
2024-04-07 05:01:58 +09:30
kindhuge
91de1fff89 spatial/r3,stat: remove repeated words in comments 2024-04-07 04:58:03 +09:30
Eng Zer Jun
e44948ca04 all: replace min/max helpers with min/max builtins 2024-04-06 20:24:32 +10:30
Jonathan Bluett-Duncan
8a2036b741 graph: replace ordered.Int64s with slices.Sort 2024-03-23 15:29:19 +10:30
Jonathan Bluett-Duncan
b7b8c32778 floats: add deprecation warning to Reverse 2024-03-23 11:11:18 +10:30
Jonathan Bluett-Duncan
67ef7582e8 floats: add benchmarks for Reverse 2024-03-23 11:11:18 +10:30
Jonathan Bluett-Duncan
06535719e1 floats: replace custom reverse logic with slices.Reverse 2024-03-23 11:11:18 +10:30
Ethan Reesor
c72bc440ad A+C: add Ethan Reesor v0.15.0 2024-03-16 07:21:13 +10:30
Ethan Reesor
269815f07e spatial/curve: new package to constuct 2-, 3- and 4-D Hilbert curves 2024-03-16 07:20:54 +10:30
Jonathan Bluett-Duncan
43d122ba35 A+C: add Jonathan Bluett-Duncan 2024-03-13 05:43:53 +10:30
Jonathan Bluett-Duncan
9c01d5c2be ci: update to go1.21 2024-03-13 05:43:31 +10:30
Dan Kortschak
d532ec56a8 ci: update actions to latest versions 2024-02-13 05:57:20 +10:30
Dan Kortschak
3a8bd7099d ci: update for go1.22 2024-02-13 05:57:20 +10:30
Sebastien Binet
f74f45f5f3 all: bump x/image to v0.14.0
This is to fix CVE-2023-29407 and CVE-2023-29408.
There's probably a low probability for gonum code to be hit by those but
dependabot is persistent.

Signed-off-by: Sebastien Binet <binet@cern.ch>
2023-11-28 09:27:50 +01:00
Vladimir Chalupecky
b27ae13fdd lapack/gonum: add Dptcon 2023-11-25 23:47:47 +01:00
Vladimir Chalupecky
55edfc1d26 lapack/testlapack: add dlanst 2023-11-25 23:47:47 +01:00
Vladimir Chalupecky
3462e90a5a lapack/gonum: add Dptsv 2023-11-23 11:54:07 +01:00
Vladimir Chalupecky
44d84c93aa lapack/gonum: add Dpttrs 2023-11-23 11:54:07 +01:00