@@ -75,14 +75,14 @@ Note that indexing is relative to the first index. To introduce an offset, use [
7575var  Float64Array  =  require ( ' @stdlib/array/float64'   );
7676
7777//  Initial arrays...
78- var  x0 =  new  Float64Array ( [ 1 .0 , 1 .0 , 1 .0 , 1.0  ] );
78+ var  x0 =  new  Float64Array ( [ 0 .0 , 3 .0 , 2 .0 , 1.0  ] );
7979var  A  =  new  Float64Array ( [ 1.0 , 2.0 , 3.0 , 2.0 , 1.0 , 2.0 , 3.0 , 2.0 , 1.0  ] );
8080
8181//  Create offset views...
8282var  x1 =  new  Float64Array ( x0 .buffer , x0 .BYTES_PER_ELEMENT * 1  ); //  start at 2nd element
8383
8484dsyr ( ' row-major'  , ' upper'  , 3 , 1.0 , x1, - 1 , A , 3  );
85- //  A => <Float64Array>[ 2.0, 3 .0, 4 .0, 2.0, 2 .0, 3 .0, 3.0, 2.0, 2 .0 ]
85+ //  A => <Float64Array>[ 2.0, 4 .0, 6 .0, 2.0, 5 .0, 8 .0, 3.0, 2.0, 10 .0 ]
8686``` 
8787
8888#### dsyr.ndarray( uplo, N, α, x, sx, ox, A, sa1, sa2, oa )  
@@ -149,10 +149,11 @@ var opts = {
149149
150150var  N  =  3 ;
151151
152- //  Define 3x3  symmetric matrices:
152+ //  Create N-by-N  symmetric matrices:
153153var  A1  =  ones ( N * N , opts .dtype  );
154154var  A2  =  ones ( N * N , opts .dtype  );
155155
156+ //  Create a random vector:
156157var  x =  discreteUniform ( N , - 10.0 , 10.0 , opts );
157158
158159dsyr ( ' row-major'  , ' upper'  , 3 , 1.0 , x, 1 , A1 , 3  );
@@ -217,7 +218,7 @@ The function accepts the following arguments:
217218-   **LDA**: `[in] CBLAS_INT` stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`). 
218219
219220```c 
220- void c_dsyr( const CBLAS_LAYOUT layout, const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *x , const CBLAS_INT strideX, double *A, const CBLAS_INT LDA ) 
221+ void c_dsyr( const CBLAS_LAYOUT layout, const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *X , const CBLAS_INT strideX, double *A, const CBLAS_INT LDA ) 
221222``` 
222223
223224#### c_dsyr_ndarray( uplo, N, alpha, \* X, sx, ox, \* A, sa1, sa2, oa )  
@@ -247,7 +248,7 @@ The function accepts the following arguments:
247248-   **oa**: `[in] CBLAS_INT` starting index for `A`. 
248249
249250```c 
250- void c_dsyr_ndarray( const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *x , const CBLAS_INT strideX, const CBLAS_INT offsetX, double *A, const CBLAS_INT strideA1, const CBLAS_INT strideA2, const CBLAS_INT offsetA ) 
251+ void c_dsyr_ndarray( const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *X , const CBLAS_INT strideX, const CBLAS_INT offsetX, double *A, const CBLAS_INT strideA1, const CBLAS_INT strideA2, const CBLAS_INT offsetA ) 
251252``` 
252253
253254</section >
@@ -301,7 +302,7 @@ int main( void ) {
301302        printf( "A1[ %i ] = %f\n", i, A1[ i ] ); 
302303    } 
303304
304-     // Perform the symmetric rank 1 operation `A = α*x*x^T + A` using alternative semantics  indexing: 
305+     // Perform the symmetric rank 1 operation `A = α*x*x^T + A` using alternative indexing semantics : 
305306    c_dsyr_ndarray( CblasUpper, N, 1.0, x, 1, 0, A2, N, 1, 0 ); 
306307
307308    // Print the result: 
0 commit comments