Skip to content

Commit 5060e5e

Browse files
committed
Update complex number namespace README
1 parent c699f86 commit 5060e5e

1 file changed

Lines changed: 11 additions & 31 deletions

File tree

lib/node_modules/@stdlib/complex/README.md

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var o = ns;
3939
// returns {...}
4040
```
4141

42-
The namespace constains constructor functions for both 64-bit and 128-bit complex numbers.
42+
The namespace constains complex number constructors.
4343

4444
<!-- <toc keywords="+data, +structure, +types"> -->
4545

@@ -69,14 +69,17 @@ z = new ns.Complex64( 5.0, 3.0 );
6969

7070
In addition, the namespace contains the following functions:
7171

72-
<!-- <toc keywords="-data, -structure, -types, -reviver"> -->
72+
<!-- <toc keywords="-data, -structure, -types"> -->
7373

7474
<div class="namespace-toc">
7575

7676
- <span class="signature">[`conj( z )`][@stdlib/complex/conj]</span><span class="delimiter">: </span><span class="description">return the complex conjugate of a complex number.</span>
7777
- <span class="signature">[`imag( z )`][@stdlib/complex/imag]</span><span class="delimiter">: </span><span class="description">return the imaginary component of a complex number.</span>
7878
- <span class="signature">[`real( z )`][@stdlib/complex/real]</span><span class="delimiter">: </span><span class="description">return the real component of a complex number.</span>
7979
- <span class="signature">[`reim( z )`][@stdlib/complex/reim]</span><span class="delimiter">: </span><span class="description">return the real and imaginary components of a complex number.</span>
80+
- <span class="signature">[`reviveComplex( key, value )`][@stdlib/complex/reviver]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized complex number.</span>
81+
- <span class="signature">[`reviveComplex64( key, value )`][@stdlib/complex/reviver-float32]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized 64-bit complex number.</span>
82+
- <span class="signature">[`reviveComplex128( key, value )`][@stdlib/complex/reviver-float64]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized 128-bit complex number.</span>
8083

8184
</div>
8285

@@ -92,29 +95,6 @@ str = v.toString();
9295
// returns '5 - 3i'
9396
```
9497

95-
Finally, the namespace contains utility functions to revive JSON-serialized `complex` numbers.
96-
97-
<!-- <toc keywords="+reviver"> -->
98-
99-
<div class="namespace-toc">
100-
101-
- <span class="signature">[`reviveComplex( key, value )`][@stdlib/complex/reviver]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized complex number.</span>
102-
- <span class="signature">[`reviveComplex64( key, value )`][@stdlib/complex/reviver-float32]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized 64-bit complex number.</span>
103-
- <span class="signature">[`reviveComplex128( key, value )`][@stdlib/complex/reviver-float64]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized 128-bit complex number.</span>
104-
105-
</div>
106-
107-
<!-- </toc> -->
108-
109-
```javascript
110-
var parseJSON = require( '@stdlib/utils/parse-json' );
111-
112-
var str = '{"type":"Complex128","re":5,"im":3}';
113-
114-
var z = parseJSON( str, ns.reviveComplex );
115-
// returns <Complex128>
116-
```
117-
11898
</section>
11999

120100
<!-- /.usage -->
@@ -142,12 +122,6 @@ console.log( getKeys( ns ) );
142122

143123
<!-- <toc-links> -->
144124

145-
[@stdlib/complex/reviver]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/reviver
146-
147-
[@stdlib/complex/reviver-float32]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/reviver-float32
148-
149-
[@stdlib/complex/reviver-float64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/reviver-float64
150-
151125
[@stdlib/complex/conj]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/conj
152126

153127
[@stdlib/complex/imag]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/imag
@@ -156,6 +130,12 @@ console.log( getKeys( ns ) );
156130

157131
[@stdlib/complex/reim]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/reim
158132

133+
[@stdlib/complex/reviver]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/reviver
134+
135+
[@stdlib/complex/reviver-float32]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/reviver-float32
136+
137+
[@stdlib/complex/reviver-float64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/reviver-float64
138+
159139
[@stdlib/complex/cmplx]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/cmplx
160140

161141
[@stdlib/complex/float32]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float32

0 commit comments

Comments
 (0)