-
Notifications
You must be signed in to change notification settings - Fork 4
/
doc.json
2220 lines (2220 loc) · 64.9 KB
/
doc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"basic": {
"binomial": {
"funcName": "binomial",
"funcDesc": "Calculates the binomial coefficient of <i>n</i>,<i>k</i> (<i>n</i> choose <i>k</i>).",
"paramNames": [
"n",
"k"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"Number of available choices.",
"Number of choices selected."
],
"returnName": "num",
"returnType": "Int",
"returnDesc": "The number of combinations of choices, <i>n</i> choose <i>k</i>.",
"errors": "This function does not raise any errors."
},
"divMod": {
"funcName": "divMod",
"funcDesc": "Calculates the divisor (quotient) and modulus (remainder) amongst two integers <i>a,b</i>.",
"paramNames": [
"a",
"b"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"First integer.",
"Second integer."
],
"returnName": "arr",
"returnType": "Array",
"returnDesc": "An array whose first element is the divisor (<i>a</i>/<i>b</i>) and second element is the modulus (<i>a</i>%<i>b</i>). Returns false if <i>a</i> or <i>b</i> is not an integer.",
"errors": "This function does not raise any errors (although it should)."
},
"egcd": {
"funcName": "egcd",
"funcDesc": "Performs the extended Euclidean algorithm (calculates x,y such that ax + by = gcd(a,b) ).",
"paramNames": [
"a",
"b"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"First integer.",
"Second integer."
],
"returnName": "arr",
"returnType": "Array",
"returnDesc": "An array whose first element is gcd(a,b), second element is x, and third element is y such that ax + by = gcd(a,b) is satisfied.",
"errors": "This function does not raise any errors."
},
"factorial": {
"funcName": "factorial",
"funcDesc": "Calculates the factorial of a positive integer, <i>n</i>.",
"paramNames": [
"n"
],
"paramTypes": [
"Int"
],
"paramDescs": [
"A positive integer."
],
"returnName": "num",
"returnType": "Int",
"returnDesc": "Factorial of <i>n</i>",
"errors": "This function does not raise any errors."
},
"fallingFactorial": {
"funcName": "fallingFactorial",
"funcDesc": "Calculates the falling factorial of a positive integer <i>n</i> with <i>k</i> steps: n!/(n-k)!",
"paramNames": [
"n",
"k"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"A positive integer.",
"The number of steps to fall."
],
"returnName": "r",
"returnType": "Int",
"returnDesc": "Falling factorial of <i>n</i> with <i>k</i> steps. If <span class=\"lit\">k > n</span> then 0 is returned.",
"errors": "This function does not raise any errors."
},
"gcd": {
"funcName": "gcd",
"funcDesc": "Calculates the greatest common divisor (gcd) amongst two integers.",
"paramNames": [
"a",
"b"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"First integer.",
"Second integer."
],
"returnName": "num",
"returnType": "Int",
"returnDesc": "The gcd of <i>a,b</i>. If <i>a</i> or <i>b</i> are Infinity or -Infinity, then Infinity is returned. If <i>a</i> or <i>b</i> are not numbers, then NaN is returned.",
"errors": [
"<i>a</i> or <i>b</i> is not an integer."
]
},
"isInt": {
"funcName": "isInt",
"funcDesc": "Determines if a number is an integer.",
"paramNames": [
"n"
],
"paramTypes": [
"Number"
],
"paramDescs": [
"A number."
],
"returnName": "bool",
"returnType": "Boolean",
"returnDesc": "true if <i>n</i> is an integer, false otherwise.",
"errors": "This function does not raise any errors."
},
"lcm": {
"funcName": "lcm",
"funcDesc": "Calculates the lowest common multiple (lcm) amongst two integers.",
"paramNames": [
"a",
"b"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"First integer.",
"Second integer."
],
"returnName": "num",
"returnType": "Int",
"returnDesc": "The lcm of <i>a,b</i>. If <i>a</i> or <i>b</i> are Infinity or -Infinity, then <span class=\"lit\">0</span> is returned. If <i>a</i> or <i>b</i> are not numbers, then NaN is returned.",
"errors": [
"<i>a</i> or <i>b</i> is not an integer."
]
},
"max": {
"funcName": "max",
"funcDesc": "Finds the maximum value in an array.",
"paramNames": [
"arr"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"An array of numbers."
],
"returnName": "num",
"returnType": "Int",
"returnDesc": "Maximum value inside <i>arr</i>. -Infinity is returned if <i>arr</i> is empty.",
"errors": [
"<i>arr</i> is not an array."
]
},
"min": {
"funcName": "min",
"funcDesc": "Finds the minimum value in an array.",
"paramNames": [
"arr"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"An array of numbers."
],
"returnName": "numfct",
"returnType": "Int",
"returnDesc": "Minimum value inside <i>arr</i>. Infinity is returned if <i>arr</i> is empty.",
"errors": [
"<i>arr</i> is not an array."
]
},
"modInverse": {
"funcName": "modInverse",
"funcDesc": "Calculates the modular multiplicative inverse <i>x</i> of an integer <i>a</i> and modulus <i>m</i>, ax = 1 (mod m).",
"paramNames": [
"a",
"m"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"An integer.",
"Modulus."
],
"returnName": "x",
"returnType": "Int",
"returnDesc": "An integer such that ax = 1 (mod m).",
"errors": [
"<i>x</i> cannot be calculated (i.e. no modular multiplicative inverse exists)."
]
},
"numbersEqual": {
"funcName": "numbersEqual",
"funcDesc": "Determines if two numbers, <i>a,b</i>, are equal within a given margin of precision, <i>epsilon</i>.",
"paramNames": [
"a",
"b",
"epsilon"
],
"paramTypes": [
"Number",
"Number",
"Number"
],
"paramDescs": [
"First number.",
"Second number.",
"Precision."
],
"returnName": "bool",
"returnType": "Boolean",
"returnDesc": "true if they are equal within the precision, false otherwise",
"errors": "This function does not raise any errors."
},
"permutation": {
"funcName": "permutation",
"funcDesc": "Calculate the permutation (n choose k)",
"paramNames": [
"n",
"k"
],
"paramTypes": [
"Int",
"Int"
],
"paramDescs": [
"Number of total elements",
"Fixed number of elements"
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "Number of ordered variations",
"errors": [
"<i>n</i> cannot be less than or equal to 0.",
"<i>k</i> cannot be greater than <i>n</i>."
]
},
"powerMod": {
"funcName": "powerMod",
"funcDesc": "Calculates the modulus of an exponential number, a^b mod m.",
"paramNames": [
"a",
"b",
"m"
],
"paramTypes": [
"Int",
"Int",
"Int"
],
"paramDescs": [
"Base.",
"Exponent.",
"Modulus."
],
"returnName": "num",
"returnType": "Int",
"returnDesc": "a^b mod m.",
"errors": "This function does not raise any errors (although it should)."
},
"product": {
"funcName": "product",
"funcDesc": "Calculates the product of the elements of an array.",
"paramNames": [
"arr"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"An array of numbers."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The product of the elements of <i>arr</i>.",
"errors": [
"not all elements of <i>arr</i> are numbers",
"<i>arr</i> is not an array"
]
},
"random": {
"funcName": "random",
"funcDesc": "Retrieves a specified quantity, <i>quant</i> of elements from an array, <i>arr</i> at random. If <i>allowDuplicates</i> is true, then the resulting array is allowed to duplicates of numbers.",
"paramNames": [
"arr",
"quant",
"allowDuplicates"
],
"paramTypes": [
"Array",
"Int",
"Boolean"
],
"paramDescs": [
"Array of values to pick from.",
"Number of values to retrieve.",
"Allow numbers to be returned more than once."
],
"returnName": "randomArr",
"returnType": "Array",
"returnDesc": "An array of randomly chosen numbers from <i>arr</i>.",
"errors": [
"<i>arr</i> is empty",
"<i>quant</i> is greater than the number of elements in <i>arr</i> and <i>allowDuplicates</i> is false"
]
},
"range": {
"funcName": "range",
"funcDesc": "Creates a range of numbers from <i>start</i> (inclusive) to <i>stop</i> (exclusive), increasing by <i>step</i> each iteration. All arguments optional.",
"paramNames": [
"start",
"stop",
"step"
],
"paramTypes": [
"Int",
"Int",
"Int"
],
"paramDescs": [
"Start of range (included). Default value is 0.",
"End of range (excluded). Default value is the value of start.",
"Increment size. Default value is 1."
],
"returnName": "arr",
"returnType": "Array",
"returnDesc": "An array of numbers. If no arguments are given, then [0] is returned.",
"errors": "This function does not raise any errors."
},
"shuffle": {
"funcName": "shuffle",
"funcDesc": "Shuffles the elements of an array in place.",
"paramNames": [
"arr"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"An array."
],
"returnName": "shuffledArr",
"returnType": "Number",
"returnDesc": "A shuffled version of <i>arr</i>.",
"errors": "This function does not raise any errors."
},
"square": {
"funcName": "square",
"funcDesc": "Calculates the square of a number.",
"paramNames": [
"n"
],
"paramTypes": [
"Number"
],
"paramDescs": [
"A number."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "<i>n</i> squared.",
"errors": "This function does not raise any errors."
},
"subtraction": {
"funcName": "subtraction",
"funcDesc": "Calculates the differences of elements of an array, using the first element as the starting point.",
"paramNames": [
"arr"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"An array of numbers."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The difference of the elements of <i>arr</i>.",
"errors": [
"not all elements of <i>arr</i> are numbers",
"<i>arr</i> is not an array"
]
},
"sum": {
"funcName": "sum",
"funcDesc": "Calculates the sum of the elements of an array.",
"paramNames": [
"arr"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"An array of numbers."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The sum of the elements of <i>arr</i>.",
"errors": [
"not all elements of <i>arr</i> are numbers",
"<i>arr</i> is not an array"
]
}
},
"complex": {
"add": {
"funcName": "add",
"funcDesc": "Add <i>z</i> to this complex number.",
"paramNames": [
"z"
],
"paramTypes": [
"Complex"
],
"paramDescs": [
"A complex number."
],
"returnName": "w",
"returnType": "Complex",
"returnDesc": "A new complex number.",
"errors": "This function does not raise any errors."
},
"complexPow": {
"funcName": "complexPow",
"funcDesc": "Raise this complex number to a complex number, <i>z</i>.",
"paramNames": [
"z"
],
"paramTypes": [
"Complex"
],
"paramDescs": [
"Complex power of this complex number."
],
"returnName": "w",
"returnType": "Complex",
"returnDesc": "Raised complex number.",
"errors": "This function does not raise any errors."
},
"conjugate": {
"funcName": "conjugate",
"funcDesc": "Calculates the conjugate of this complex number.",
"paramNames": [],
"paramTypes": [],
"paramDescs": [],
"returnName": "z",
"returnType": "Complex",
"returnDesc": "The conjugate.",
"errors": "This function does not raise any errors."
},
"cosine": {
"funcName": "cosine",
"funcDesc": "Calculates the cosine of this complex number.",
"paramNames": [],
"paramTypes": [],
"paramDescs": [],
"returnName": "z",
"returnType": "Complex",
"returnDesc": "The cosine.",
"errors": "This function does not raise any errors."
},
"divide": {
"funcName": "divide",
"funcDesc": "Divide this complex number by <i>z</i>.",
"paramNames": [
"z"
],
"paramTypes": [
"Complex"
],
"paramDescs": [
"A complex number."
],
"returnName": "w",
"returnType": "Complex",
"returnDesc": "A new complex number.",
"errors": "This function does not raise any errors."
},
"equals": {
"funcName": "equals",
"funcDesc": "Determines if this complex number and another complex number, <i>z</i>, are equal.",
"paramNames": [
"z"
],
"paramTypes": [
"Complex"
],
"paramDescs": [
"A complex number."
],
"returnName": "bool",
"returnType": "Boolean",
"returnDesc": "true if this complex number and <i>z</i> are equal; false otherwise.",
"errors": "This function does not raise any errors."
},
"magnitude": {
"funcName": "magnitude",
"funcDesc": "Calculates the magnitude of this complex number.",
"paramNames": [],
"paramTypes": [],
"paramDescs": [],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The magnitude.",
"errors": "This function does not raise any errors."
},
"multiply": {
"funcName": "multiply",
"funcDesc": "Multiply this complex number by <i>z</i>.",
"paramNames": [
"z"
],
"paramTypes": [
"Complex"
],
"paramDescs": [
"A complex number."
],
"returnName": "w",
"returnType": "Complex",
"returnDesc": "A new complex number.",
"errors": "This function does not raise any errors."
},
"phase": {
"funcName": "phase",
"funcDesc": "Calculates the phase (angle from origin) of this complex number.",
"paramNames": [],
"paramTypes": [],
"paramDescs": [],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The phase.",
"errors": "This function does not raise any errors."
},
"pow": {
"funcName": "pow",
"funcDesc": "Raise this complex number to the <i>n</i>th power.",
"paramNames": [
"n"
],
"paramTypes": [
"Number"
],
"paramDescs": [
"Power of the complex number."
],
"returnName": "w",
"returnType": "Complex",
"returnDesc": "Raised complex number.",
"errors": "This function does not raise any errors."
},
"roots": {
"funcName": "roots",
"funcDesc": "Calculates all of the <i>n</i>th roots of this complex number.",
"paramNames": [
"n"
],
"paramTypes": [
"Number"
],
"paramDescs": [
"The order of the roots of this complex number."
],
"returnName": "roots",
"returnType": "Array",
"returnDesc": "The <i>n</i>th roots of this complex number.",
"errors": "This function does not raise any errors."
},
"sine": {
"funcName": "sine",
"funcDesc": "Calculates the sine of this complex number.",
"paramNames": [],
"paramTypes": [],
"paramDescs": [],
"returnName": "z",
"returnType": "Complex",
"returnDesc": "The sine.",
"errors": "This function does not raise any errors."
},
"subtract": {
"funcName": "subtract",
"funcDesc": "Subtract <i>z</i> from this complex number.",
"paramNames": [
"z"
],
"paramTypes": [
"Complex"
],
"paramDescs": [
"A complex number."
],
"returnName": "w",
"returnType": "Complex",
"returnDesc": "A new complex number.",
"errors": "This function does not raise any errors."
},
"tan": {
"funcName": "tan",
"funcDesc": "Calculates the tan of this complex number.",
"paramNames": [],
"paramTypes": [],
"paramDescs": [],
"returnName": "z",
"returnType": "Complex",
"returnDesc": "The tan.",
"errors": "This function does not raise any errors."
}
},
"calculus": {
"adaptiveSimpson": {
"funcName": "adaptiveSimpson",
"funcDesc": "Simpson's method of approximating the integral of a function, <i>f</i>, on the interval [<i>a</i>,<i>b</i>].",
"paramNames": [
"f",
"a",
"b",
"eps"
],
"paramTypes": [
"Function",
"Number",
"Number",
"Number"
],
"paramDescs": [
"The function to be evaluated.",
"The left endpoint of the interval.",
"The right endpoint of the interval.",
"An error bound."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The approximation of the integral of <i>f</i> on [<i>a</i>,<i>b</i>].",
"errors": "This function does not raise any errors."
},
"LanczosGamma": {
"funcName": "LanczosGamma",
"funcDesc": "Lanczos' approximation to the gamma function of a number, <i>n</i>.",
"paramNames": [
"n"
],
"paramTypes": [
"Number"
],
"paramDescs": [
"A number."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "Gamma of <i>n</i>.",
"errors": "This function does not raise any errors."
},
"limit": {
"funcName": "limit",
"funcDesc": "Calculates the limit of a function, <i>f</i>, at a point <i>x</i>. The point can be approached from the left, right, or middle (a combination of the left and right).",
"paramNames": [
"f",
"x",
"approach"
],
"paramTypes": [
"Function",
"Number",
"String"
],
"paramDescs": [
"The function to be evaluated.",
"The point for which the limit will be calculated.",
"A desired approach. left, right and middle are the possible approaches."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The limit of <i>f</i> at <i>x</i>.",
"errors": [
"an approach is not given"
]
},
"MonteCarlo": {
"funcName": "MonteCarlo",
"funcDesc": "The Monte-Carlo method for approximating the integral of a singlevariate or multivariate function, <i>f</i>, over a given interval(s). The number of intervals must match the number of variables of the function. The nth element of I is the interval for the nth variable of the function.",
"paramNames": [
"f",
"N",
"I"
],
"paramTypes": [
"Function",
"Number",
"Array"
],
"paramDescs": [
"The function to be evaluated.",
"The number of function evaluations.",
"An array of arrays, where each inner array is an interval containing \n the endpoints."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "An approximation to the integral of <i>f</i> with <i>N</i> function evaluations.",
"errors": [
"there are no intervals given (<span class=\"lit\">L.length == 0</span>)",
"N is not positive"
]
},
"pointDiff": {
"funcName": "pointDiff",
"funcDesc": "Calculates the point differential of a function <i>f</i> at a point <i>x</i>. Currently only supports one-dimensional functions.",
"paramNames": [
"f",
"x"
],
"paramTypes": [
"Function",
"Number"
],
"paramDescs": [
"The function to be evaluated.",
"The point for which the point differential will be calculated."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The point differential of <i>f</i> at <i>x</i>.",
"errors": "This function does not raise any errors."
},
"Riemann": {
"funcName": "Riemann",
"funcDesc": "Calculates the Riemann sum for a one-variable function <i>f</i> on the interval [<i>a</i>,<i>b</i>] with <i>n</i> equally-spaced divisons. If <i>sampler</i> is given, that function will be used to calculate which value to sample on each subinterval; otherwise, the left endpoint will be used.",
"paramNames": [
"f",
"a",
"b",
"n",
"sampler"
],
"paramTypes": [
"Function",
"Number",
"Number",
"Number",
"Function, optional"
],
"paramDescs": [
"The function to be evaluated.",
"The left endpoint of the interval.",
"The right endpoint of the interval.",
"The number of subintervals.",
"A function that determines what value is to be used for sampling \n on a subinterval."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The Riemann sum of <i>f</i> on [<i>a</i>,<i>b</i>] with <i>n</i> divisions.",
"errors": "This function does not raise any errors."
},
"SimpsonDef": {
"funcName": "SimpsonDef",
"funcDesc": "Simpson's method of approximating the integral of a function, <i>f</i>, on the interval [<i>a</i>,<i>b</i>].",
"paramNames": [
"f",
"a",
"b"
],
"paramTypes": [
"Function",
"Number",
"Number"
],
"paramDescs": [
"The function to be evaluated.",
"The left endpoint of the interval.",
"The right endpoint of the interval."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "The approximation of the integral of <i>f</i> on [<i>a</i>,<i>b</i>].",
"errors": "This function does not raise any errors."
},
"SimpsonRecursive": {
"funcName": "SimpsonRecursive",
"funcDesc": "The helper function used for adaptive Simpson's method of approximating the integral of a function, <i>f</i>, on the interval [<i>a</i>,<i>b</i>].",
"paramNames": [
"f",
"a",
"b",
"whole",
"eps"
],
"paramTypes": [
"Function",
"Number",
"Number",
"Number",
"Number"
],
"paramDescs": [
"The function to be evaluated.",
"The left endpoint of the interval.",
"The right endpoint of the interval.",
"The value of the integral of f on [a,b] \n (Simpson's approximation, in the caes of adaptiveSimpson).",
"An error bound."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "A recursive evaluation of the left and right sides.",
"errors": "This function does not raise any errors."
},
"StirlingGamma": {
"funcName": "StirlingGamma",
"funcDesc": "Striling's approximation to the gamma function of a number, <i>n</i>.",
"paramNames": [
"n"
],
"paramTypes": [
"Number"
],
"paramDescs": [
"A number."
],
"returnName": "num",
"returnType": "Number",
"returnDesc": "Gamma of <i>n</i>.",
"errors": "This function does not raise any errors."
}
},
"dsp": {
"fft": {
"funcName": "fft",
"funcDesc": "Calculates the Discrete Fourier Transform (DFT) of an array, <i>x</i> of real numbers, using a Fast Fourier Transform (FFT) algorithm.",
"paramNames": [
"x"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"An array of real numbers."
],
"returnName": "arr",
"returnType": "Array",
"returnDesc": "An array of complex numbers, the DFT of the elements of <i>x</i>.",
"errors": [
"the number of elements in <i>x</i> is not a power of 2."
]
},
"segment": {
"funcName": "segment",
"funcDesc": "Creates an array composed of elements from <i>arr</i>, starting at the <i>start</i>-th element of arr, and incrementing by <i>step</i>.",
"paramNames": [
"arr",
"start",
"step"
],
"paramTypes": [
"Array",
"Int",
"Int"
],
"paramDescs": [
"An array.",
"The initial index.",
"The increment size."
],
"returnName": "segArr",
"returnType": "Array",
"returnDesc": "A new array consisting of elements from <i>arr</i>.",
"errors": "This function does not raise any errors."
}
},
"generate": {
"collatz": {
"funcName": "collatz",
"funcDesc": "Populates a given array, <i>arr</i>, with a Collatz sequence, starting the sequence at the positive integer <i>n</i>.",
"paramNames": [
"n",
"arr"
],
"paramTypes": [
"Int",
"Array"
],
"paramDescs": [
"Starting point.",
"An array."
],
"returnName": "colArr",
"returnType": "Array",
"returnDesc": "<i>arr</i> populated with the Collatz sequence.",
"errors": "This function does not raise any errors."
},
"fibonacci": {
"funcName": "fibonacci",
"funcDesc": "Calculates the <i>n</i>th Fibonacci number.",
"paramNames": [
"n"
],
"paramTypes": [
"Int"
],
"paramDescs": [
"Desired Fibonacci number to calculate."
],
"returnName": "num",
"returnType": "Int",
"returnDesc": "<i>n</i>th Fibonacci number.",
"errors": "This function does not raise any errors."
}
},
"matrix": {
"addition": {
"funcName": "addition",
"funcDesc": "Add two matrices, <i>M1</i> and <i>M2</i>, together.",
"paramNames": [
"M1",
"M2"
],
"paramTypes": [
"Array",
"Array"
],
"paramDescs": [
"First matrix.",
"Second matrix."
],
"returnName": "M",
"returnType": "Array",
"returnDesc": "Addition of <i>M1</i>, <i>M2</i>.",
"errors": [
"the dimensions of <i>M1</i> and <i>M2</i> do not match"
]
},
"affine": {
"funcName": "affine",
"funcDesc": "Perform an affine transformation 2D vector, <i>v</i>, by factors <i>tx</i> and <i>ty</i>.",
"paramNames": [
"v",
"tx",
"ty"
],
"paramTypes": [
"Array",
"Number",
"Number"
],
"paramDescs": [
"A 2D vector.",
"The x-factor.",
"The y-factor."
],
"returnName": "Vaff",
"returnType": "Array",
"returnDesc": "Affined <i>v</i>.",
"errors": [
"<i>v</i> is not 2D (<span class=\"lit\">v.length !== 2</span>)"
]
},
"deepCopy": {
"funcName": "deepCopy",
"funcDesc": "Create a deep copy of a matrix, <i>M</i>.",
"paramNames": [
"M"
],
"paramTypes": [
"Array"
],
"paramDescs": [
"The matrix to copy."
],
"returnName": "Mnew",
"returnType": "Array",
"returnDesc": "Deep copy of <i>M</i>.",
"errors": [
"<i>M</i> is not a matrix"
]