@@ -22,6 +22,12 @@ limitations under the License.
2222
2323> Generate a double-precision floating-point Vandermonde matrix.
2424
25+ <section class =" intro " >
26+
27+ </section >
28+
29+ <!-- /.intro -->
30+
2531<section class =" usage " >
2632
2733## Usage
@@ -30,7 +36,7 @@ limitations under the License.
3036var dvander = require ( ' @stdlib/blas/ext/base/dvander' );
3137```
3238
33- #### dvander( order, mode, M, N, x, strideX, out, LDO )
39+ #### dvander( order, mode, M, N, x, strideX, out, ldo )
3440
3541Generates a double-precision floating-point Vandermonde matrix.
3642
@@ -46,45 +52,14 @@ dvander( 'row-major', -1, 3, 3, x, 1, out, 3 );
4652
4753The function has the following parameters:
4854
49- - ** order** : storage layout .
50- - ** mode** : specifies whether columns should contain powers that are increasing ( ` 1 ` ) or decreasing ( ` -1 ` ) .
51- - ** M** : number of rows in ` out ` .
55+ - ** order** : row-major (C-style) or column-major (Fortran-style) order .
56+ - ** mode** : mode. If ` mode < 0 ` , the function generates decreasing powers. If ` mode > 0 ` , the function generates increasing powers .
57+ - ** M** : number of rows in ` out ` and number of indexed elements in ` x ` .
5258- ** N** : number of columns in ` out ` .
5359- ** x** : input [ ` Float64Array ` ] [ @stdlib/array/float64 ] .
5460- ** strideX** : stride length for ` x ` .
55- - ** out** : output [ ` Float64Array ` ] [ @stdlib/array/float64 ] .
56- - ** LDO** : stride length for the leading dimension of ` out ` .
57-
58- The stride parameter determines which elements in the input array are accessed at runtime. For example, to use every other element in ` x ` ,
59-
60- ``` javascript
61- var Float64Array = require ( ' @stdlib/array/float64' );
62-
63- var x = new Float64Array ( [ 1.0 , 0.0 , 2.0 , 0.0 , 3.0 , 0.0 ] );
64- var out = new Float64Array ( 9 );
65-
66- dvander ( ' row-major' , - 1 , 3 , 3 , x, 2 , out, 3 );
67- // out => <Float64Array>[ 1.0, 1.0, 1.0, 4.0, 2.0, 1.0, 9.0, 3.0, 1.0 ]
68- ```
69-
70- Note that indexing is relative to the first index. To introduce an offset, use [ ` typed array ` ] [ mdn-typed-array ] views.
71-
72- <!-- eslint-disable stdlib/capitalized-comments -->
73-
74- ``` javascript
75- var Float64Array = require ( ' @stdlib/array/float64' );
76-
77- // Initial array...
78- var x0 = new Float64Array ( [ 0.0 , 1.0 , 2.0 , 3.0 ] );
79-
80- // Create an offset view...
81- var x1 = new Float64Array ( x0 .buffer , x0 .BYTES_PER_ELEMENT * 1 ); // start at 2nd element
82-
83- var out = new Float64Array ( 9 );
84-
85- dvander ( ' row-major' , - 1 , 3 , 3 , x1, 1 , out, 3 );
86- // out => <Float64Array>[ 1.0, 1.0, 1.0, 4.0, 2.0, 1.0, 9.0, 3.0, 1.0 ]
87- ```
61+ - ** out** : output matrix stored in linear memory as a [ ` Float64Array ` ] [ @stdlib/array/float64 ] .
62+ - ** ldo** : stride of the first dimension of ` out ` (a.k.a., leading dimension of the matrix ` out ` ).
8863
8964<!-- lint disable maximum-heading-length -->
9065
@@ -107,22 +82,10 @@ dvander.ndarray( -1, 3, 3, x, 1, 0, out, 3, 1, 0 );
10782The function has the following additional parameters:
10883
10984- ** offsetX** : starting index for ` x ` .
110- - ** strideOut1** : stride of the first dimension of ` out ` .
111- - ** strideOut2** : stride of the second dimension of ` out ` .
85+ - ** strideOut1** : stride length for the first dimension of ` out ` .
86+ - ** strideOut2** : stride length for the second dimension of ` out ` .
11287- ** offsetOut** : starting index for ` out ` .
11388
114- 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,
115-
116- ``` javascript
117- var Float64Array = require ( ' @stdlib/array/float64' );
118-
119- var x = new Float64Array ( [ 0.0 , 1.0 , 2.0 , 3.0 ] );
120- var out = new Float64Array ( 9 );
121-
122- dvander .ndarray ( - 1 , 3 , 3 , x, 1 , 1 , out, 3 , 1 , 0 );
123- // out => <Float64Array>[ 1.0, 1.0, 1.0, 4.0, 2.0, 1.0, 9.0, 3.0, 1.0 ]
124- ```
125-
12689</section >
12790
12891<!-- /.usage -->
@@ -131,7 +94,7 @@ dvander.ndarray( -1, 3, 3, x, 1, 1, out, 3, 1, 0 );
13194
13295## Notes
13396
134- - If ` M ` or ` N ` is equal to ` 0 ` , both functions return ` out ` unchanged.
97+ - If ` M <= 0 ` or ` N <= 0 ` , both functions return the output matrix unchanged.
13598
13699</section >
137100
@@ -206,13 +169,13 @@ stdlib_strided_dvander( CblasRowMajor, -1.0, 3, 3, x, 1, Out, 3 );
206169The function accepts the following arguments:
207170
208171- **order**: `[in] CBLAS_LAYOUT` storage layout.
209- - **mode**: `[in] double` specifies whether powers are increasing (`1`) or decreasing (`-1`) .
210- - **M**: `[in] CBLAS_INT` number of rows in `Out`.
172+ - **mode**: `[in] double` mode. If `mode < 0`, the function generates decreasing powers. If `mode > 0`, the function generates increasing powers .
173+ - **M**: `[in] CBLAS_INT` number of rows in `Out` and number of indexed elements in `X` .
211174- **N**: `[in] CBLAS_INT` number of columns in `Out`.
212175- **X**: `[in] double*` input array.
213176- **strideX**: `[in] CBLAS_INT` stride length for `X`.
214- - **Out**: `[out] double*` output array .
215- - **LDO**: `[in] CBLAS_INT` stride length for the leading dimension of `out` .
177+ - **Out**: `[out] double*` output matrix .
178+ - **LDO**: `[in] CBLAS_INT` stride of the first dimension of `Out` (a.k.a., leading dimension of the matrix `Out`) .
216179
217180```c
218181void API_SUFFIX(stdlib_strided_dvander)( const CBLAS_LAYOUT order, const double mode, const CBLAS_INT M, const CBLAS_INT N, const double *X, const CBLAS_INT strideX, double *Out, const CBLAS_INT LDO );
@@ -237,15 +200,15 @@ stdlib_strided_dvander_ndarray( -1.0, 3, 3, x, 1, 0, Out, 3, 1, 0 );
237200
238201The function accepts the following arguments:
239202
240- - **mode**: `[in] double` specifies whether powers are increasing (`1`) or decreasing (`-1`) .
241- - **M**: `[in] CBLAS_INT` number of rows in `Out`.
203+ - **mode**: `[in] double` mode. If `mode < 0`, the function generates decreasing powers. If `mode > 0`, the function generates increasing powers .
204+ - **M**: `[in] CBLAS_INT` number of rows in `Out` and number of indexed elements in `X` .
242205- **N**: `[in] CBLAS_INT` number of columns in `Out`.
243206- **X**: `[in] double*` input array.
244207- **strideX**: `[in] CBLAS_INT` stride length for `X`.
245208- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
246- - **Out**: `[out] double*` output array .
247- - **strideOut1**: `[in] CBLAS_INT` stride of the first dimension of `Out`.
248- - **strideOut2**: `[in] CBLAS_INT` stride of the second dimension of `Out`.
209+ - **Out**: `[out] double*` output matrix .
210+ - **strideOut1**: `[in] CBLAS_INT` stride length for the first dimension of `Out`.
211+ - **strideOut2**: `[in] CBLAS_INT` stride length for the second dimension of `Out`.
249212- **offsetOut**: `[in] CBLAS_INT` starting index for `Out`.
250213
251214```c
@@ -306,6 +269,12 @@ int main( void ) {
306269
307270<!-- /.c -->
308271
272+ <section class="references">
273+
274+ </section>
275+
276+ <!-- /.references -->
277+
309278<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
310279
311280<section class="related">
@@ -320,8 +289,6 @@ int main( void ) {
320289
321290[@stdlib/array/float64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float64
322291
323- [mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
324-
325292</section>
326293
327294<!-- /.links -->
0 commit comments