Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
1195 commits
Select commit Hold shift + click to select a range
e5c1f92
refactor: use base array assertion utility
kgryte Mar 30, 2025
ee57af4
refactor: use base array assertion utility
kgryte Mar 30, 2025
ebb7d9d
style: resolve lint error
kgryte Mar 30, 2025
22e382b
style: resolve lint errors
kgryte Mar 30, 2025
87d73e7
refactor: use base array assertion utility
kgryte Mar 30, 2025
6dc5ea7
refactor: use base array assertion utility
kgryte Mar 30, 2025
fa71a1e
feat!: distinguish between signed zeros
kgryte Mar 30, 2025
81fca71
test: fix test failures
kgryte Mar 30, 2025
8575ee7
feat!: remove `equalnans` support
kgryte Mar 30, 2025
1eb07cf
docs: remove comments and fix note
kgryte Mar 30, 2025
82ee31f
feat!: remove `equalNaNs` support
kgryte Mar 30, 2025
bbc90c5
refactor: use more generic types
kgryte Mar 30, 2025
fc42bf4
refactor: use more generic types
kgryte Mar 30, 2025
c7f571e
feat: add `array/base/index-of-same-value`
kgryte Mar 31, 2025
e8a96a1
feat: add `indexOfSameValue` to namespace
kgryte Mar 31, 2025
25fd7dd
feat: add `array/base/last-index-of-same-value`
kgryte Mar 31, 2025
e8bb580
feat: add `lastIndexOfSameValue` to namespace
kgryte Mar 31, 2025
7ff916d
feat: add accessor protocol support
kgryte Mar 31, 2025
72739f2
test: address test failures
kgryte Mar 31, 2025
b68b283
feat: add specialized support for complex number and boolean arrays
kgryte Mar 31, 2025
c7f060f
test: add test cases
kgryte Mar 31, 2025
91c33f0
refactor: reduce overhead by using specialized utilities
kgryte Mar 31, 2025
534ddc0
refactor: reduce overhead by using specialized utilities
kgryte Mar 31, 2025
f57b1c2
refactor: reduce overhead by using specialized utilities
kgryte Mar 31, 2025
b27b960
test: add test cases
kgryte Mar 31, 2025
74d2527
feat: add specialized support for complex number and boolean arrays
kgryte Mar 31, 2025
20e7abf
docs: update REPL namespace documentation
stdlib-bot Mar 31, 2025
7899d23
feat: update namespace TypeScript declarations
stdlib-bot Mar 31, 2025
76fb0db
docs: update list of contributors
stdlib-bot Mar 31, 2025
9998d76
docs: update namespace table of contents
stdlib-bot Mar 31, 2025
f0af2cb
chore: fix JavaScript lint errors
lohithganni Mar 31, 2025
1b06282
chore: fix style and return values
anxhukumar Mar 31, 2025
7ae0a0a
bench: ensure analytic formula is measured
anxhukumar Mar 31, 2025
88e00d0
feat: add C implementation for `stats/base/dists/betaprime/pdf`
Neerajpathak07 Mar 31, 2025
ef5a939
test: fix missing `opts` argument
kgryte Apr 1, 2025
eb0c8c9
docs: replace manual `for` loop in examples
hrshya Apr 1, 2025
bb378ff
docs: replace manual `for` loop in examples
hrshya Apr 1, 2025
86a5626
docs: replace manual `for` loop in examples
hrshya Apr 1, 2025
a8a346c
build: handle full list of package directories
Planeshifter Mar 31, 2025
33cad38
build: process directories individually
Planeshifter Apr 1, 2025
89d16f9
chore: fix JSON lint errors
nasarobot Apr 1, 2025
9798bd0
docs: update list of contributors
stdlib-bot Apr 1, 2025
a46814a
docs: update REPL namespace documentation
stdlib-bot Apr 1, 2025
f2c38e2
docs: update namespace table of contents
stdlib-bot Apr 1, 2025
e28064f
docs: update namespace TypeScript declarations
stdlib-bot Apr 1, 2025
bf96d9c
fix: rename internal variable `fcn` to avoid shadowing and lint errors
anandkaranubc Apr 1, 2025
a1e230f
chore: clean up cppcheck-suppress comments
anandkaranubc Apr 1, 2025
998b3ba
feat: add missing kernels to `ndarray/base/unary-reduce-subarray`
headlessNode Apr 1, 2025
b3d21c0
docs: remove outdated FAQ on shadowed declaration warning
anandkaranubc Apr 1, 2025
3425c5a
bench: add missing `native.js` and fix variable range
anandkaranubc Apr 1, 2025
f0df313
feat: added accessor protocol support to `stats/base/meanpn`
dhruvilmehta Apr 1, 2025
89c41ab
test: clean-up test messages and resolve lint errors
kgryte Apr 1, 2025
dc8d9a6
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into de…
kgryte Apr 1, 2025
2c98a80
feat: add `stats/incr/nanstdev`
NirvedMishra Apr 1, 2025
a567912
docs: fix example
kgryte Apr 1, 2025
5fc6df0
docs: fix description
kgryte Apr 1, 2025
03ee1fb
docs: fix description
kgryte Apr 1, 2025
0e30fc5
build(deps): bump 8398a7/action-slack from 3.16.2 to 3.18.0
dependabot[bot] Apr 1, 2025
9b47248
build(deps): bump actions/cache from 4.2.2 to 4.2.3
dependabot[bot] Apr 1, 2025
538bd9c
build(deps): bump crazy-max/ghaction-import-gpg from 6.2.0 to 6.3.0
dependabot[bot] Apr 1, 2025
4222663
build(deps): bump peter-evans/create-pull-request from 7.0.6 to 7.0.8
dependabot[bot] Apr 1, 2025
871b395
build(deps): bump r-lib/actions from 2.11.2 to 2.11.3
dependabot[bot] Apr 1, 2025
0e04cae
feat: add C implementation for `@stdlib/stats/base/dists/logistic/log…
DhruvArvindSingh Apr 1, 2025
a81d6c3
chore: replace manual `for` loop in examples
hrshya Apr 1, 2025
220f055
chore: replace manual `for` loop in examples
hrshya Apr 1, 2025
7545f38
build: refactor workflow to create multiple declarations PRs
Planeshifter Apr 2, 2025
0dc3f20
docs: replace manual `for` loop in examples
hrshya Apr 2, 2025
5df078f
docs: replace manual `for` loop in examples
hrshya Apr 2, 2025
8805742
chore: resolve lint errors in `random/base/minstd`
impawstarlight Apr 2, 2025
56d8d56
feat: add C implementation for `stats/base/dists/hypergeometric/varia…
anandkaranubc Apr 2, 2025
b96a6a2
test: add missing tests to `ndarray/base/unary`
headlessNode Apr 2, 2025
cfa7b23
chore: address commit comment
hrshya Apr 2, 2025
78dc663
chore: address commit comment
hrshya Apr 2, 2025
09aac30
chore: address commit comment
hrshya Apr 2, 2025
4e53b42
style: remove whitespace
kgryte Apr 2, 2025
d3289c3
test: use `zfill` rather than `gfill` to improve performance
kgryte Apr 2, 2025
feb552b
bench: update random value generation
hrshya Apr 2, 2025
cc8314e
docs: update namespace table of contents
stdlib-bot Apr 2, 2025
3c02758
docs: update REPL namespace documentation
stdlib-bot Apr 2, 2025
1820a95
docs: update related packages sections
stdlib-bot Apr 2, 2025
a48c7f5
chore: update mailmap
kgryte Apr 2, 2025
41d0632
feat: refactor and add protocol support to `stats/base/nanvariancewd`
prajjwalbajpai Apr 2, 2025
7a7d225
docs: update list of contributors
stdlib-bot Apr 2, 2025
67d1bf8
feat: add `constants/float32/fourth-root-eps`
hrshya Apr 2, 2025
baf9f87
feat: add `constants/float32/eulergamma`
Neerajpathak07 Apr 2, 2025
9b72f0c
feat: add `math/base/special/csignumf`
anandkaranubc Apr 2, 2025
40ba86d
feat: add `constants/float32/min-ln`
hrshya Apr 2, 2025
a83525e
feat: add `constants/float32/max-ln`
hrshya Apr 2, 2025
8297683
feat: add `math/base/special/fibonaccif`
anandkaranubc Apr 2, 2025
0dc5e1f
fix: update `hypot` to follow the IEEE 754-2019 standard
anandkaranubc Apr 2, 2025
8af2d8d
fix: update `hypotf` to follow the IEEE 754-2019 standard
anandkaranubc Apr 2, 2025
dceca5a
test: fix addon tests
kgryte Apr 2, 2025
1aa6c6d
test: add tests for C99 edge cases
anandkaranubc Apr 2, 2025
f9cd43c
feat: add `math/base/special/atan2d`
anandkaranubc Apr 2, 2025
a464a60
chore: fix EditorConfig lint errors
Eternity0207 Apr 2, 2025
5d57761
chore: fix EditorConfig lint errors
Eternity0207 Apr 2, 2025
b2db775
chore: fix EditorConfig lint error
Eternity0207 Apr 2, 2025
ecc74c7
chore: fix EditorConfig lint errors
Eternity0207 Apr 2, 2025
8436708
feat: add `constants/float32/catalan`
Neerajpathak07 Apr 2, 2025
f222a56
feat: add C implementation for `stats/base/dists/exponential/pdf`
0PrashantYadav0 Apr 2, 2025
a3d171d
feat: add C implementation for `stats/base/dists/exponential/mgf`
0PrashantYadav0 Apr 2, 2025
1775485
feat: add C implementation for `stats/base/dists/normal/skewness`
manvith2003 Apr 2, 2025
e1cc668
feat: add C implementation for `stats/base/dists/normal/mode`
manvith2003 Apr 2, 2025
0d59526
feat: add `constants/float32/max-safe-lucas`
hrshya Apr 2, 2025
cbffd97
test: add tests for C99 edge cases
anandkaranubc Apr 2, 2025
ea11328
docs: update examples for `blas/base/wasm/cscal`
Rupa-Rd Apr 2, 2025
3d10cb9
chore: clean-up
kgryte Apr 2, 2025
ca4cd66
chore: clean-up
kgryte Apr 2, 2025
20475c3
chore: clean-up
kgryte Apr 2, 2025
4d4ff63
chore: clean-up
kgryte Apr 2, 2025
6aeed5c
docs: fix parameter name
ShabiShett07 Apr 2, 2025
1c11f2e
chore: address C lint errors
JaySoni1 Apr 2, 2025
7eae6df
chore: update type list
kgryte Apr 2, 2025
b670bb9
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into de…
kgryte Apr 2, 2025
54534dd
chore: address commit comments
JaySoni1 Apr 3, 2025
770c8fa
chore: remove empty lines
kgryte Apr 3, 2025
cd6e347
docs: update example
kgryte Apr 3, 2025
c9c5acc
docs: update examples for `blas/base/wasm/csrot`
ShabiShett07 Apr 3, 2025
d214449
chore: address commit comment
hemantmm Apr 3, 2025
7584a65
bench: remove benchmarks
kgryte Apr 3, 2025
3e1d620
bench: refactor benchmarks in `math/base/special/exp`
gururaj1512 Apr 3, 2025
8a365fc
bench: refactor random number generation `math/base/special/cexp*`
saurabhraghuvanshii Apr 3, 2025
63ff101
feat: add C implementation for `stats/base/dists/gumbel/skewness`
ShabiShett07 Apr 3, 2025
2529fff
feat: add C implementation for `stats/base/dists/cosine/variance`
aayush0325 Apr 3, 2025
8523abf
feat: add C implementation for `stats/base/dists/t/pdf`
AadishJ Apr 3, 2025
912e9e1
feat: add `stats/base/dists/kumaraswamy/kurtosis`
ShabiShett07 Apr 3, 2025
da47c6e
docs: update namespace table of contents
stdlib-bot Apr 3, 2025
0319d5a
docs: update REPL namespace documentation
stdlib-bot Apr 3, 2025
a4c1a0d
docs: update list of contributors
stdlib-bot Apr 3, 2025
27a2c76
chore: clean-up
kgryte Apr 3, 2025
cc2d62e
chore: clean-up
kgryte Apr 3, 2025
d5f2b9a
chore: clean-up
kgryte Apr 3, 2025
da17eab
chore: clean-up
kgryte Apr 3, 2025
8b5f811
chore: address commit comments
saad-imran-dev Apr 3, 2025
bb44973
chore: fix C lint error
anxhukumar Apr 3, 2025
d7583fb
test: increase code coverage in `blas/base/caxpy`
ShabiShett07 Apr 3, 2025
3e69370
feat: add C implementation for `stats/base/dists/erlang/kurtosis`
Neerajpathak07 Apr 3, 2025
c487a89
feat: add C implementation for `stats/base/dists/arcsine/median`
pranav-1720 Apr 3, 2025
b3ed367
docs: add FAQ on generating local test coverage report
anandkaranubc Apr 3, 2025
baee728
fix: inconsistent anchor tag links for headings
anandkaranubc Apr 3, 2025
e20f4e4
fix: condition check in `blas/base/dsyr2` ndarray
ShabiShett07 Apr 3, 2025
192e98f
chore: clean-up
kgryte Apr 3, 2025
e976bd1
chore: clean-up
kgryte Apr 3, 2025
893dc6f
bench: fix value ranges
kgryte Apr 3, 2025
e97e770
chore: fix addon and configuration
kgryte Apr 3, 2025
7f0f10c
docs: update REPL namespace documentation
stdlib-bot Apr 4, 2025
b98c6a9
docs: update related packages sections
stdlib-bot Apr 4, 2025
28cd5a9
docs: update list of contributors
stdlib-bot Apr 4, 2025
a321f17
feat: add `FIF_F` macro in `math/base/napi/ternary`
Neerajpathak07 Apr 4, 2025
846b05e
chore: clean-up
kgryte Apr 4, 2025
13b7262
chore: fix EditorConfig lint errors
Taaha-Tariq Apr 4, 2025
d070f40
docs: fix example
kgryte Apr 4, 2025
d2564c7
docs: update example
kgryte Apr 4, 2025
1392a91
feat: add 0d kernels
kgryte Apr 5, 2025
8bb576b
feat: add 10d kernels
kgryte Apr 5, 2025
9dec091
feat: add 1d kernels
kgryte Apr 5, 2025
27cd3d9
feat: add 2d kernels
kgryte Apr 5, 2025
999d496
feat: add 3d kernels
kgryte Apr 5, 2025
dab4993
feat: add 4d kernels
kgryte Apr 5, 2025
6c1ccd3
chore: add package meta data
kgryte Apr 5, 2025
54ea642
feat: add C implementation for `stats/base/dists/bernoulli/pmf`
Neerajpathak07 Apr 5, 2025
d623ed1
feat: add C implementation for `stats/base/dists/levy/entropy`
NishchayRajput Apr 5, 2025
8ba53a1
feat: add C implementation for `stats/base/dists/planck/mean`
yuvimittal Apr 5, 2025
9adef4a
feat: add C implementation for `stats/base/dists/kumaraswamy/variance`
ShabiShett07 Apr 5, 2025
6f4bd30
feat: add C implementation for `stats/base/dists/levy/cdf`
AadishJ Apr 5, 2025
7e02d8e
bench: fix function name
Planeshifter Apr 5, 2025
5271c7a
style: use tabs instead of spaces
Planeshifter Apr 5, 2025
c907d71
feat: add 5d kernels
kgryte Apr 5, 2025
6bdf8aa
feat: add 6d kernels
kgryte Apr 5, 2025
f13f725
feat: add 7d kernels
kgryte Apr 5, 2025
175e813
feat: add 8d kernels
kgryte Apr 5, 2025
9eb7bd3
feat: add 9d kernels
kgryte Apr 5, 2025
7631d15
feat: add nd kernels
kgryte Apr 5, 2025
2ec7da5
feat: add package entry point
kgryte Apr 5, 2025
f48027c
docs: fix description
kgryte Apr 5, 2025
ba1be5d
docs: add REPL help and TS declarations
kgryte Apr 5, 2025
63f96e4
test: add initial tests
kgryte Apr 5, 2025
5b99ffb
docs: fix text block
kgryte Apr 5, 2025
9635155
docs: add example
kgryte Apr 5, 2025
4b9e117
docs: add README
kgryte Apr 5, 2025
1e0863b
bench: add benchmarks
kgryte Apr 5, 2025
5fee83f
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into de…
kgryte Apr 5, 2025
ac2b843
bench: fix invocations
kgryte Apr 5, 2025
128019a
docs: update examples
kgryte Apr 5, 2025
89c86cc
docs: update REPL namespace documentation
stdlib-bot Apr 5, 2025
e110fad
docs: update list of contributors
stdlib-bot Apr 5, 2025
8459c35
feat: add `FII_F` macro in `math/base/napi/ternary`
Neerajpathak07 Apr 5, 2025
fc1d8d5
fix: condition checks in `blas/base/ssyr2`
ShabiShett07 Apr 5, 2025
560e643
chore: fix EditorConfig lint errors
Taaha-Tariq Apr 5, 2025
b1a5a2d
docs: replace manual `for` loop in examples
hrshya Apr 5, 2025
9541650
test: increase code coverage in `blas/base/ssyr2`
ShabiShett07 Apr 5, 2025
043dc69
fix: handle 0d edge case
kgryte Apr 5, 2025
f0d205d
fix: address indexing error
kgryte Apr 5, 2025
3f4de77
feat: add `ndarray/includes`
kgryte Apr 5, 2025
fccf762
docs: update copy
kgryte Apr 5, 2025
b5bff35
docs: update copy
kgryte Apr 5, 2025
2197129
chore: clean-up
kgryte Apr 5, 2025
9d9f653
chore: clean-up
kgryte Apr 5, 2025
197a69a
chore: clean-up
kgryte Apr 5, 2025
14de0d5
chore: clean-up
kgryte Apr 5, 2025
05a7000
chore: re-enable lint rule
kgryte Apr 5, 2025
f7db171
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
d8437b8
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
7184862
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
1e85369
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
7896f80
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
3e268db
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
d0c1c2b
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
e4185d6
feat: add C implementation for `stats/base/dists/erlang/entropy`
Neerajpathak07 Apr 5, 2025
70e237f
feat: add C implementation for `stats/base/dists/erlang/variance`
Neerajpathak07 Apr 5, 2025
5c0b04d
chore: address commit comments for commit bb378ff (issue #6499)
PrathamBhamare Apr 5, 2025
9caa895
feat: add C implementation for `stats/base/dists/erlang/skewness`
Neerajpathak07 Apr 5, 2025
d9ad02c
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
9211c88
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
9452b23
chore: fix EditorConfig lint errors (issue #6552)
dipexplorer Apr 5, 2025
7966727
build: do not include line if null
Planeshifter Apr 5, 2025
0e376f8
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 5, 2025
64023d1
test: add tests for IEEE 754-2019 compliance
anandkaranubc Apr 6, 2025
d9a9405
feat: add C implementation for `stats/base/dists/gamma/variance`
aayush0325 Apr 6, 2025
49608b5
feat: add C implementation for `stats/base/dists/exponential/variance`
aayush0325 Apr 6, 2025
aa9d5fc
feat: add C implementation for `stats/base/dists/normal/variance`
aayush0325 Apr 6, 2025
1ad09d5
chore: update package meta data
stdlib-bot Apr 6, 2025
6e75319
feat: add C imlpementation for `stats/base/dists/t/entropy`
aayush0325 Apr 6, 2025
c82ae2b
feat: add C implementation for `stats/base/dists/invgamma/variance`
aayush0325 Apr 6, 2025
0decd76
docs: rename docs-src to src-docs for consistency
karanBRAVO Apr 6, 2025
4f00f84
docs: update list of contributors
stdlib-bot Apr 6, 2025
6c7175d
docs: update REPL namespace documentation
stdlib-bot Apr 6, 2025
1f53990
feat: add C implementation for `stats/base/dists/cosine/mean`
sethdivyansh Apr 6, 2025
aee7cdf
feat: add C implementation for `stats/base/dists/laplace/mean`
sethdivyansh Apr 6, 2025
37149a9
feat: add C implementation for `stats/base/dists/laplace/median`
sethdivyansh Apr 6, 2025
1097586
feat: add C implementation for `stats/base/dists/uniform/cdf`
sethdivyansh Apr 6, 2025
d7721ac
docs: fix C example code
Planeshifter Apr 6, 2025
4760d21
docs: fix C Doxygen return tag
Planeshifter Apr 6, 2025
8a2e9e4
feat: add C implementation for `stats/base/dists/laplace/pdf`
sethdivyansh Apr 6, 2025
c74be7a
feat: add C implementation for `@stdlib/stats/base/dists/laplace/logpdf`
DhruvArvindSingh Apr 6, 2025
e6f0da1
feat: add C implementation for `stats/base/dists/laplace/quantile`
DhruvArvindSingh Apr 6, 2025
aab376a
feat: added C implementation for `stats/base/dists/weibull/mode`
DhruvArvindSingh Apr 6, 2025
09c74b0
feat: add C implementation for `stats/base/dists/laplace/logcdf`
DhruvArvindSingh Apr 6, 2025
1239d3e
feat: add C implementation for `stats/base/dists/logistic/quantile`
DhruvArvindSingh Apr 6, 2025
633dc6b
feat: add C implementation for `stats/base/dists/laplace/cdf`
DhruvArvindSingh Apr 6, 2025
630ddb7
test: replace equal with strictEqual
anandkaranubc Apr 7, 2025
0f611a1
feat: add blas/base/zdotu
gururaj1512 Jan 7, 2025
8ff520d
fix: package.json lint errors
gururaj1512 Jan 7, 2025
6733d86
Update index.js
gururaj1512 Jan 7, 2025
0bb2dc1
fix: apply suggested changes
gururaj1512 Jan 13, 2025
6c82fe7
fix: annotations
gururaj1512 Jan 13, 2025
2c39eaa
fix: minor bugs
gururaj1512 Jan 16, 2025
98951a9
refactor: replace cmul and cadd with muladd
gururaj1512 Mar 2, 2025
cfc103c
Merge branch 'blas-base-zdotu' of https://github.com/gururaj1512/stdl…
gururaj1512 Apr 8, 2025
62b2e66
fix: repl lint errors
gururaj1512 Apr 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
251 changes: 251 additions & 0 deletions lib/node_modules/@stdlib/blas/base/zdotu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
<!--

@license Apache-2.0

Copyright (c) 2025 The Stdlib Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

# zdotu

> Calculate the dot product of two double-precision complex floating-point vectors.

<section class="intro">

The [dot product][dot-product] (or scalar product) is defined as

<!-- <equation class="equation" label="eq:dot_product" align="center" raw="\mathbf{x}\cdot\mathbf{y} = \sum_{i=0}^{N-1} x_i y_i = x_0 y_0 + x_1 y_1 + \ldots + x_{N-1} y_{N-1}" alt="Dot product definition."> -->

```math
\mathbf{zx}\cdot\mathbf{zy} = \sum_{i=0}^{N-1} zx_i zy_i = zx_0 zy_0 + zx_1 zy_1 + \ldots + zx_{N-1} zy_{N-1}
```

<!-- <div class="equation" align="center" data-raw-text="\mathbf{x}\cdot\mathbf{y} = \sum_{i=0}^{N-1} x_i y_i = x_0 y_0 + x_1 y_1 + \ldots + x_{N-1} y_{N-1}" data-equation="eq:dot_product">
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@929657146427564b61e3e6bdda76949ebe2ce923/lib/node_modules/@stdlib/blas/base/ddot/docs/img/equation_dot_product.svg" alt="Dot product definition.">
<br>
</div> -->

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage

```javascript
var zdotu = require( '@stdlib/blas/base/zdotu' );
```

#### zdotu( N, zx, strideX, zy, strideY )

Calculates the dot product of vectors `zx` and `zy`.

```javascript
var Complex128Array = require( '@stdlib/array/complex128' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var zx = new Complex128Array( [ 4.0, 2.0, -3.0, 5.0, -1.0, 7.0 ] );
var zy = new Complex128Array( [ 2.0, 6.0, -1.0, -4.0, 8.0, 9.0 ] );

var z = zdotu( 3, zx, 1, zy, 1 );
// returns <Complex128>

var re = real( z );
// returns -52.0

var im = imag( z );
// returns 82.0
```

The function has the following parameters:

- **N**: number of indexed elements.
- **zx**: input [`Complex128Array`][@stdlib/array/complex128].
- **strideX**: index increment for `zx`.
- **zy**: input [`Complex128Array`][@stdlib/array/complex128].
- **strideY**: index increment for `zy`.

The `N` and strides parameters determine which elements in the strided arrays are accessed at runtime. For example, to calculate the dot product of every other value in `zx` and the first `N` elements of `zy` in reverse order,

```javascript
var Complex128Array = require( '@stdlib/array/complex128' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
var zy = new Complex128Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );

var z = zdotu( 2, zx, 2, zy, -1 );
// returns <Complex128>

var re = real( z );
// returns -2.0

var im = imag( z );
// returns 14.0
```

Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.

<!-- eslint-disable stdlib/capitalized-comments -->

```javascript
var Complex128Array = require( '@stdlib/array/complex128' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

// Initial arrays...
var zx0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
var zy0 = new Complex128Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );

// Create offset views...
var zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
var zy1 = new Complex128Array( zy0.buffer, zy0.BYTES_PER_ELEMENT*2 ); // start at 3th element

var z = zdotu( 1, zx1, 1, zy1, 1 );
// returns <Complex128>

var re = real( z );
// returns -15.0

var im = imag( z );
// returns 80.0
```

#### zdotu.ndarray( N, zx, strideX, offsetX, zy, strideY, offsetY )

Calculates the dot product of `zx` and `zy` using alternative indexing semantics.

```javascript
var Complex128Array = require( '@stdlib/array/complex128' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var zx = new Complex128Array( [ 4.0, 2.0, -3.0, 5.0, -1.0, 7.0 ] );
var zy = new Complex128Array( [ 2.0, 6.0, -1.0, -4.0, 8.0, 9.0 ] );

var z = zdotu.ndarray( zx.length, zx, 1, 0, zy, 1, 0 );
// returns <Complex128>

var re = real( z );
// returns -52.0

var im = imag( z );
// returns 82.0
```

The function has the following additional parameters:

- **offsetX**: starting index for `zx`.
- **offsetY**: starting index for `zy`.

While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to calculate the dot product of every other value in `zx` starting from the second value with the last 2 elements in `zy` in reverse order

```javascript
var Complex128Array = require( '@stdlib/array/complex128' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
var zy = new Complex128Array( [ 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0 ] ); // eslint-disable-line max-len

var z = zdotu.ndarray( 2, zx, 2, 1, zy, -1, zy.length-1 );
// returns <Complex128>

var re = real( z );
// returns -40.0

var im = imag( z );
// returns 310.0
```

</section>

<!-- /.usage -->

<section class="notes">

## Notes

- If `N <= 0`, both functions return `0.0 + 0.0i`.
- `zdotu()` corresponds to the [BLAS][blas] level 1 function [`zdotu`][zdotu].

</section>

<!-- /.notes -->

<section class="examples">

## Examples

<!-- eslint no-undef: "error" -->

```javascript
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var filledarrayBy = require( '@stdlib/array/filled-by' );
var zdotu = require( '@stdlib/blas/base/zdotu' );

function rand() {
return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
}

var zx = filledarrayBy( 10, 'complex128', rand );
console.log( zx.toString() );

var zy = filledarrayBy( 10, 'complex128', rand );
console.log( zy.toString() );

var out = zdotu.ndarray( zx.length, zx, 1, 0, zy, -1, zy.length-1 );
console.log( out.toString() );
```

</section>

<!-- /.examples -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

[dot-product]: https://en.wikipedia.org/wiki/Dot_product

[blas]: http://www.netlib.org/blas

[zdotu]: https://www.netlib.org/lapack/explore-html/d1/dcc/group__dot_ga6b0b69474b384d45fc4c7b1f7ec5959f.html#ga6b0b69474b384d45fc4c7b1f7ec5959f

[@stdlib/array/complex128]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/complex128

[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray

<!-- <related-links> -->

<!-- </related-links> -->

</section>

<!-- /.links -->
107 changes: 107 additions & 0 deletions lib/node_modules/@stdlib/blas/base/zdotu/benchmark/benchmark.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var uniform = require( '@stdlib/random/array/uniform' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var pow = require( '@stdlib/math/base/special/pow' );
var Complex128Array = require( '@stdlib/array/complex128' );
var pkg = require( './../package.json' ).name;
var zdotu = require( './../lib/zdotu.js' );


// VARIABLES //

var options = {
'dtype': 'float64'
};


// FUNCTIONS //

/**
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var zx;
var zy;

zx = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
zy = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
return benchmark;

/**
* Benchmark function.
*
* @private
* @param {Benchmark} b - benchmark instance
*/
function benchmark( b ) {
var d;
var i;

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
d = zdotu( zx.length, zx, 1, zy, 1 );
if ( isnan( d ) ) {
b.fail( 'should not return NaN' );
}
}
b.toc();
if ( isnan( d ) ) {
b.fail( 'should not return NaN' );
}
b.pass( 'benchmark finished' );
b.end();
}
}


// MAIN //

/**
* Main execution sequence.
*
* @private
*/
function main() {
var len;
var min;
var max;
var f;
var i;

min = 1; // 10^min
max = 5; // 10^max

for ( i = min; i <= max; i++ ) {
len = pow( 10, i );
f = createBenchmark( len );
bench( pkg+':len='+len, f );
}
}

main();
Loading
Loading