Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
131 changes: 0 additions & 131 deletions lib/node_modules/@stdlib/blas/ext/base/ssort2ins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,137 +193,6 @@ console.log( y );

* * *

<!-- C interface documentation. -->

<section class="c">

## C APIs

<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->

<section class="intro">

</section>

<!-- /.intro -->

<!-- C usage documentation. -->

<section class="usage">

### Usage

```c
#include "stdlib/blas/ext/base/ssort2ins.h"
```

#### stdlib_strided_ssort2ins( N, order, \*X, strideX, \*Y, strideY )

Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort.

```c
float x[] = { 1.0f, -2.0f, 3.0f, -4.0f };
float y[] = { 0.0f, 1.0f, 2.0f, 3.0f };

stdlib_strided_ssort2ins( 4, 1.0f, x, 1, y, 1 );
```

The function accepts the following arguments:

- **N**: `[in] CBLAS_INT` number of indexed elements.
- **order**: `[in] float` sort order. If `order < 0.0`, the input strided array `X` is sorted in **decreasing** order. If `order > 0.0`, the input strided array `X` is sorted in **increasing** order. If `order == 0.0`, the input strided arrays are left unchanged.
- **X**: `[inout] float*` first input array.
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
- **Y**: `[inout] float*` second input array.
- **strideY**: `[in] CBLAS_INT` stride length for `Y`.

```c
stdlib_strided_ssort2ins( const CBLAS_INT N, const float order, float *X, const CBLAS_INT strideX, float *Y, const CBLAS_INT strideY );
```

<!--lint disable maximum-heading-length-->

#### stdlib_strided_ssort2ins_ndarray( N, order, \*X, strideX, offsetX, \*Y, strideY, offsetY )

<!--lint enable maximum-heading-length-->

Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort and alternative indexing semantics.

```c
float x[] = { 1.0f, -2.0f, 3.0f, -4.0f };
float y[] = { 0.0f, 1.0f, 2.0f, 3.0f };

stdlib_strided_ssort2ins_ndarray( 4, 1.0f, x, 1, 0, y, 1, 0 );
```

The function accepts the following arguments:

- **N**: `[in] CBLAS_INT` number of indexed elements.
- **order**: `[in] float` sort order. If `order < 0.0`, the input strided array `X` is sorted in **decreasing** order. If `order > 0.0`, the input strided array `X` is sorted in **increasing** order. If `order == 0.0`, the input strided arrays are left unchanged.
- **X**: `[inout] float*` first input array.
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
- **Y**: `[inout] float*` second input array.
- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
- **offsetY**: `[in] CBLAS_INT` starting index for `Y`.

```c
stdlib_strided_ssort2ins_ndarray( const CBLAS_INT N, const float order, float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY );
```

</section>

<!-- /.usage -->

<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

</section>

<!-- /.notes -->

<!-- C API usage examples. -->

<section class="examples">

### Examples

```c
#include "stdlib/blas/ext/base/ssort2ins.h"
#include <stdio.h>

int main( void ) {
// Create strided arrays:
float x[] = { 1.0f, -2.0f, 3.0f, -4.0f, 5.0f, -6.0f, 7.0f, -8.0f };
float y[] = { 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f };

// Specify the number of elements:
int N = 8;

// Specify the strides:
int strideX = 1;
int strideY = 1;

// Sort the arrays:
stdlib_strided_ssort2ins( N, 1.0f, x, strideX, y, strideY );

// Print the result:
for ( int i = 0; i < 8; i++ ) {
printf( "x[ %i ] = %f\n", i, x[ i ] );
printf( "y[ %i ] = %f\n", i, y[ i ] );
}
}
```

</section>

<!-- /.examples -->

</section>

<!-- /.c -->

## See Also

- <span class="package-name">[`@stdlib/blas/ext/base/dsort2ins`][@stdlib/blas/ext/base/dsort2ins]</span><span class="delimiter">: </span><span class="description">simultaneously sort two double-precision floating-point strided arrays based on the sort order of the first array using insertion sort.</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ Macro for the [square root][@stdlib/math/base/special/sqrtf] of `1/2` as a singl

<section class="related">

* * *

## See Also

- <span class="package-name">[`@stdlib/constants/float64/sqrt-half`][@stdlib/constants/float64/sqrt-half]</span><span class="delimiter">: </span><span class="description">square root of 1/2.</span>

</section>

<!-- /.related -->
Expand All @@ -132,6 +138,8 @@ Macro for the [square root][@stdlib/math/base/special/sqrtf] of `1/2` as a singl

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

[@stdlib/constants/float64/sqrt-half]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float64/sqrt-half

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

</section>
Expand Down
Loading