time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

README.md (3077B)


      1 <!--
      2 
      3 @license Apache-2.0
      4 
      5 Copyright (c) 2021 The Stdlib Authors.
      6 
      7 Licensed under the Apache License, Version 2.0 (the "License");
      8 you may not use this file except in compliance with the License.
      9 You may obtain a copy of the License at
     10 
     11    http://www.apache.org/licenses/LICENSE-2.0
     12 
     13 Unless required by applicable law or agreed to in writing, software
     14 distributed under the License is distributed on an "AS IS" BASIS,
     15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 See the License for the specific language governing permissions and
     17 limitations under the License.
     18 
     19 -->
     20 
     21 # Complex128Array
     22 
     23 > 128-bit complex number array.
     24 
     25 <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
     26 
     27 <section class="intro">
     28 
     29 </section>
     30 
     31 <!-- /.intro -->
     32 
     33 <!-- Package usage documentation. -->
     34 
     35 <section class="usage">
     36 
     37 ## Usage
     38 
     39 ```javascript
     40 var Complex128Array = require( '@stdlib/array/complex128' );
     41 ```
     42 
     43 <a name="constructor"></a>
     44 
     45 #### Complex128Array()
     46 
     47 Creates a 128-bit complex number array.
     48 
     49 ```javascript
     50 var arr = new Complex128Array();
     51 // returns <Complex128Array>
     52 ```
     53 
     54 <!-- /.usage -->
     55 
     56 <!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
     57 
     58 <section class="notes">
     59 
     60 <!-- /.notes -->
     61 
     62 <!-- Package usage examples. -->
     63 
     64 <section class="examples">
     65 
     66 * * *
     67 
     68 ## Examples
     69 
     70 <!-- eslint no-undef: "error" -->
     71 
     72 ```javascript
     73 var Complex128 = require( '@stdlib/complex/float64' );
     74 var Float64Array = require( '@stdlib/array/float64' );
     75 var Complex128Array = require( '@stdlib/array/complex128' );
     76 
     77 var arr;
     78 var out;
     79 
     80 // Create a complex array by specifying a length:
     81 out = new Complex128Array( 3 );
     82 console.log( out );
     83 
     84 // Create a complex array from an array of complex numbers:
     85 arr = [
     86     new Complex128( 1.0, -1.0 ),
     87     new Complex128( -3.14, 3.14 ),
     88     new Complex128( 0.5, 0.5 )
     89 ];
     90 out = new Complex128Array( arr );
     91 console.log( out );
     92 
     93 // Create a complex array from an interleaved typed array:
     94 arr = new Float64Array( [ 1.0, -1.0, -3.14, 3.14, 0.5, 0.5 ] );
     95 out = new Complex128Array( arr );
     96 console.log( out );
     97 
     98 // Create a complex array from an array buffer:
     99 arr = new Float64Array( [ 1.0, -1.0, -3.14, 3.14, 0.5, 0.5 ] );
    100 out = new Complex128Array( arr.buffer );
    101 console.log( out );
    102 
    103 // Create a complex array from an array buffer view:
    104 arr = new Float64Array( [ 1.0, -1.0, -3.14, 3.14, 0.5, 0.5 ] );
    105 out = new Complex128Array( arr.buffer, 16, 2 );
    106 console.log( out );
    107 ```
    108 
    109 </section>
    110 
    111 <!-- /.examples -->
    112 
    113 <!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
    114 
    115 <section class="references">
    116 
    117 </section>
    118 
    119 <!-- /.references -->
    120 
    121 <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
    122 
    123 <section class="links">
    124 
    125 </section>
    126 
    127 <!-- /.links -->