1 declare namespace liba {
3 * square root of an unsigned integer
4 * @param x independent variable
5 * @return calculated result
7 function isqrt(x: number): number;
9 * reciprocal of square-root
10 * @param x independent variable
11 * @return calculated result
13 function rsqrt(x: number): number;
15 * a hash function whose prime number is 131
16 * @param block block to be processed
17 * @param value initial value
20 function hash_bkdr(block: string, value: number): number;
22 * a hash function whose prime number is 65599
23 * @param block block to be processed
24 * @param value initial value
27 function hash_sdbm(block: string, value: number): number;
30 /** Cyclic Redundancy Check comparison table */
31 readonly table: Uint8Array;
33 * generate for 8-bit Cyclic Redundancy Check
34 * @param poly polynomial that is CRC's divisor
35 * @param reversed is reversed?
37 gen(poly: number, reversed?: boolean): crc8;
39 * calculate for 8-bit Cyclic Redundancy Check
40 * @param block block to be processed
41 * @param value initial value
42 * @return output value
44 eval(block: string, value: number): number;
46 * pack a block and its CRC-8 value
47 * @param block block to be processed
48 * @param value initial value
49 * @return packed block
51 pack(block: string, value: number): Uint8Array;
54 /** constructor for 8-bit Cyclic Redundancy Check */
57 * @param poly polynomial that is CRC's divisor
58 * @param reversed is reversed?
60 new(poly: number, reversed?: boolean): crc8;
61 readonly prototype: crc8;
65 /** Cyclic Redundancy Check comparison table */
66 readonly table: Uint16Array;
68 * generate for 16-bit Cyclic Redundancy Check
69 * @param poly polynomial that is CRC's divisor
70 * @param reversed is reversed?
72 gen(poly: number, reversed?: boolean): crc16;
74 * calculate for 16-bit Cyclic Redundancy Check
75 * @param block block to be processed
76 * @param value initial value
77 * @return output value
79 eval(block: string, value: number): number;
81 * pack a block and its CRC-16 value
82 * @param block block to be processed
83 * @param value initial value
84 * @return packed block
86 pack(block: string, value: number): Uint8Array;
89 /** constructor for 16-bit Cyclic Redundancy Check */
92 * @param poly polynomial that is CRC's divisor
93 * @param reversed is reversed?
95 new(poly: number, reversed?: boolean): crc16;
96 readonly prototype: crc16;
100 /** Cyclic Redundancy Check comparison table */
101 readonly table: Uint32Array;
103 * generate for 32-bit Cyclic Redundancy Check
104 * @param poly polynomial that is CRC's divisor
105 * @param reversed is reversed?
107 gen(poly: number, reversed?: boolean): crc32;
109 * calculate for 32-bit Cyclic Redundancy Check
110 * @param block block to be processed
111 * @param value initial value
112 * @return output value
114 eval(block: string, value: number): number;
116 * pack a block and its CRC-32 value
117 * @param block block to be processed
118 * @param value initial value
119 * @return packed block
121 pack(block: string, value: number): Uint8Array;
124 /** constructor for 32-bit Cyclic Redundancy Check */
127 * @param poly polynomial that is CRC's divisor
128 * @param reversed is reversed?
130 new(poly: number, reversed?: boolean): crc32;
131 readonly prototype: crc32;
135 /** Cyclic Redundancy Check comparison table */
136 readonly table: BigUint64Array;
138 * generate for 64-bit Cyclic Redundancy Check
139 * @param poly polynomial that is CRC's divisor
140 * @param reversed is reversed?
142 gen(poly: bigint, reversed?: boolean): crc64;
144 * calculate for 64-bit Cyclic Redundancy Check
145 * @param block block to be processed
146 * @param value initial value
147 * @return output value
149 eval(block: string, value: bigint): bigint;
151 * pack a block and its CRC-64 value
152 * @param block block to be processed
153 * @param value initial value
154 * @return packed block
156 pack(block: string, value: number): Uint8Array;
159 /** constructor for 64-bit Cyclic Redundancy Check */
162 * @param poly polynomial that is CRC's divisor
163 * @param reversed is reversed?
165 new(poly: bigint, reversed?: boolean): crc64;
166 readonly prototype: crc64;
170 /** filter coefficient [0,1] */
171 readonly alpha: number;
173 readonly output: number;
175 readonly input: number;
177 * generate for High Pass Filter
178 * @param fc cut-off frequency unit(hz)
179 * @param ts sampling time unit(s)
181 gen(fc: number, ts: number): hpf;
183 * calculate for High Pass Filter
184 * @param x input value
185 * @return output value
187 iter(x: number): number;
188 /** zeroing for High Pass Filter */
192 /** constructor for High Pass Filter */
195 * @param fc cut-off frequency unit(hz)
196 * @param ts sampling time unit(s)
198 new(fc: number, ts: number): hpf;
200 * @param alpha filter coefficient [0,1]
202 new(alpha: number): hpf;
203 readonly prototype: hpf;
207 /** filter coefficient [0,1] */
208 readonly alpha: number;
210 readonly output: number;
212 * generate for Low Pass Filter
213 * @param fc cut-off frequency unit(hz)
214 * @param ts sampling time unit(s)
216 gen(fc: number, ts: number): lpf;
218 * calculate for Low Pass Filter
219 * @param x input value
220 * @return output value
222 iter(x: number): number;
223 /** zeroing for Low Pass Filter */
227 /** constructor for Low Pass Filter */
230 * @param fc cut-off frequency unit(hz)
231 * @param ts sampling time unit(s)
233 new(fc: number, ts: number): lpf;
235 * @param alpha filter coefficient [0,1]
237 new(alpha: number): lpf;
238 readonly prototype: lpf;
241 /** membership function */
245 /** gaussian membership function */
247 /** gaussian combination membership function */
249 /** generalized bell-shaped membership function */
251 /** sigmoidal membership function */
253 /** difference between two sigmoidal membership functions */
255 /** product of two sigmoidal membership functions */
257 /** trapezoidal membership function */
259 /** triangular membership function */
261 /** linear s-shaped saturation membership function */
263 /** linear z-shaped saturation membership function */
265 /** s-shaped membership function */
267 /** z-shaped membership function */
269 /** pi-shaped membership function */
272 * gaussian membership function
273 * @param x input value for which to compute membership value.
274 * @param sigma is the standard deviation.
275 * @param c is the mean.
276 * @return membership value.
278 gauss(x: number, sigma: number, c: number): number;
280 * gaussian combination membership function
281 * @param x input value for which to compute membership value.
282 * @param sigma1 is the standard deviation of the left gaussian function.
283 * @param c1 is the mean of the left gaussian function.
284 * @param sigma2 is the standard deviation of the right gaussian function.
285 * @param c2 is the mean of the right gaussian function.
286 * @return membership value.
288 gauss2(x: number, sigma1: number, c1: number, sigma2: number, c2: number): number;
290 * generalized bell-shaped membership function
291 * @param x input value for which to compute membership value.
292 * @param a defines the width of the membership function, where a larger value creates a wider membership function.
293 * @param b defines the shape of the curve on either side of the central plateau, where a larger value creates a more steep transition.
294 * @param c defines the center of the membership function.
295 * @return membership value.
297 gbell(x: number, a: number, b: number, c: number): number;
299 * sigmoidal membership function
300 * @param x input value for which to compute membership value.
301 * @param a defines the width of the transition area.
302 * @param c defines the center of the transition area.
303 * @return membership value.
305 sig(x: number, a: number, c: number): number;
307 * difference between two sigmoidal membership functions
308 * @param x input value for which to compute membership value.
309 * @param a1 defines the width of the first transition area.
310 * @param c1 defines the center of the first transition area.
311 * @param a2 defines the width of the second transition area.
312 * @param c2 defines the center of the second transition area.
313 * @return membership value.
315 dsig(x: number, a1: number, c1: number, a2: number, c2: number): number;
317 * product of two sigmoidal membership functions
318 * @param x input value for which to compute membership value.
319 * @param a1 defines the width of the first transition area.
320 * @param c1 defines the center of the first transition area.
321 * @param a2 defines the width of the second transition area.
322 * @param c2 defines the center of the second transition area.
323 * @return membership value.
325 psig(x: number, a1: number, c1: number, a2: number, c2: number): number;
327 * trapezoidal membership function
328 * @param x input value for which to compute membership value.
329 * @param a defines its left foot.
330 * @param b defines its left shoulder.
331 * @param c defines its right shoulder.
332 * @param d defines its right foot.
333 * @return membership value.
335 trap(x: number, a: number, b: number, c: number, d: number): number;
337 * triangular membership function
338 * @param x input value for which to compute membership value.
339 * @param a defines its left foot.
340 * @param b defines its peak.
341 * @param c defines its right foot.
342 * @return membership value.
344 tri(x: number, a: number, b: number, c: number): number;
346 * linear s-shaped saturation membership function
347 * @param x input value for which to compute membership value.
348 * @param a defines its foot.
349 * @param b defines its shoulder.
350 * @return membership value.
352 lins(x: number, a: number, b: number): number;
354 * linear z-shaped saturation membership function
355 * @param x input value for which to compute membership value.
356 * @param a defines its shoulder.
357 * @param b defines its foot.
358 * @return membership value.
360 linz(x: number, a: number, b: number): number;
362 * s-shaped membership function
363 * @param x input value for which to compute membership value.
364 * @param a defines its foot.
365 * @param b defines its shoulder.
366 * @return membership value.
368 s(x: number, a: number, b: number): number;
370 * z-shaped membership function
371 * @param x input value for which to compute membership value.
372 * @param a defines its shoulder.
373 * @param b defines its foot.
374 * @return membership value.
376 z(x: number, a: number, b: number): number;
378 * pi-shaped membership function
379 * @param x input value for which to compute membership value.
380 * @param a defines its left foot.
381 * @param b defines its left shoulder.
382 * @param c defines its right shoulder.
383 * @param d defines its right foot.
384 * @return membership value.
386 pi(x: number, a: number, b: number, c: number, d: number): number;
390 /** proportional constant */
392 /** integral constant */
394 /** derivative constant */
396 /** maximum integral output */
398 /** minimum integral output */
400 /** controller integral output */
401 readonly sum: number;
402 /** maximum final output */
404 /** minimum final output */
406 /** controller final output */
407 readonly out: number;
408 /** cache feedback */
409 readonly fdb: number;
411 readonly err: number;
413 * set proportional integral derivative constant for PID controller
414 * @param kp proportional constant
415 * @param ki integral constant
416 * @param kd derivative constant
418 set_kpid(kp: number, ki: number, kd: number): pid;
420 * calculate for PID controller
421 * @param set setpoint value
422 * @param fdb feedback value
423 * @return setpoint value
425 run(set: number, fdb: number): number;
427 * calculate for positional PID controller
428 * @param set setpoint value
429 * @param fdb feedback value
430 * @return output value
432 pos(set: number, fdb: number): number;
434 * calculate for incremental PID controller
435 * @param set setpoint value
436 * @param fdb feedback value
437 * @return output value
439 inc(set: number, fdb: number): number;
440 /** zeroing for PID controller */
444 /** constructor for proportional integral derivative controller */
447 readonly prototype: pid;
450 interface pid_fuzzy {
451 /** proportional constant */
453 /** integral constant */
455 /** derivative constant */
457 /** maximum integral output */
459 /** minimum integral output */
461 /** controller integral output */
462 readonly sum: number;
463 /** maximum final output */
465 /** minimum final output */
467 /** controller final output */
468 readonly out: number;
469 /** cache feedback */
470 readonly fdb: number;
472 readonly err: number;
473 /** number of order in the square matrix */
474 readonly nrule: number;
475 /** maximum number triggered by the rule */
478 * set fuzzy relational operator for fuzzy PID controller
479 * @param opr enumeration for fuzzy PID controller operator
481 set_opr(opr: number): pid_fuzzy;
483 * set memory block for fuzzy PID controller
484 * @param num the maximum number triggered by the rule
486 set_nfuzz(num: number): pid_fuzzy;
488 * set rule base for fuzzy PID controller
489 * @param me e's membership function parameter table
490 * @param mec ec's membership function parameter table
491 * @param mkp Kp's rule base table which must be a square matrix
492 * @param mki Ki's rule base table which must be a square matrix
493 * @param mkd Kd's rule base table which must be a square matrix
495 set_rule(me: number[][], mec: number[][], mkp: number[][], mki: number[][], mkd: number[][]): pid_fuzzy;
497 * set proportional integral derivative constant for fuzzy PID controller
498 * @param kp proportional learning constant
499 * @param ki integral learning constant
500 * @param kd derivative learning constant
502 set_kpid(kp: number, ki: number, kd: number): pid_fuzzy;
504 * calculate for fuzzy PID controller
505 * @param set setpoint value
506 * @param fdb feedback value
507 * @return setpoint value
509 run(set: number, fdb: number): number;
511 * calculate for positional fuzzy PID controller
512 * @param set setpoint value
513 * @param fdb feedback value
514 * @return output value
516 pos(set: number, fdb: number): number;
518 * calculate for incremental fuzzy PID controller
519 * @param set setpoint value
520 * @param fdb feedback value
521 * @return output value
523 inc(set: number, fdb: number): number;
524 /** zeroing for fuzzy PID controller */
528 /** constructor for fuzzy PID controller */
543 /** sqrt(a,b)*sqrt(1-(1-a)*(1-b)) */
545 readonly prototype: pid_fuzzy;
548 interface pid_neuro {
549 /** proportional output coefficient */
551 /** proportional learning constant */
553 /** integral learning constant */
555 /** derivative learning constant */
557 /** proportional weight */
559 /** integral weight */
561 /** derivative weight */
563 /** maximum final output */
565 /** minimum final output */
567 /** controller final output */
568 readonly out: number;
569 /** cache feedback */
570 readonly fdb: number;
572 readonly err: number;
576 * set proportional integral derivative constant for single neuron PID controller
577 * @param k proportional output coefficient
578 * @param kp proportional learning constant
579 * @param ki integral learning constant
580 * @param kd derivative learning constant
582 set_kpid(k: number, kp: number, ki: number, kd: number): pid_neuro;
584 * set proportional integral derivative weight for single neuron PID controller
585 * @param wp proportional weight
586 * @param wi integral weight
587 * @param wd derivative weight
589 set_wpid(wp: number, wi: number, wd: number): pid_neuro;
591 * calculate for single neuron PID controller
592 * @param set setpoint value
593 * @param fdb feedback value
594 * @return setpoint value
596 run(set: number, fdb: number): number;
598 * calculate for incremental single neuron PID controller
599 * @param set setpoint value
600 * @param fdb feedback value
601 * @return output value
603 inc(set: number, fdb: number): number;
604 /** zeroing for single neuron PID controller */
608 /** constructor for single neuron PID controller */
611 readonly prototype: pid_neuro;
614 interface regress_simple {
615 /** regression coefficient */
620 * calculate predicted value for simple linear regression
621 * @param val independent variable
622 * @return predicted value
624 eval(val: number): number;
626 * calculate predicted value for simple linear regression
627 * @param val dependent variable
628 * @return predicted value
630 evar(val: number): number;
632 * cordinary least squares for simple linear regression
633 * @param x predictor data, specified as a numeric matrix
634 * @param y response data, specified as a numeric vector
635 * @param x_mean mean of predictor data
636 * @param y_mean mean of response data
638 ols_(x: number[], y: number[], x_mean: number, y_mean: number): regress_simple;
640 * cordinary least squares for simple linear regression
641 * @param x predictor data, specified as a numeric matrix
642 * @param y response data, specified as a numeric vector
643 * @param x_mean mean of predictor data
645 olsx(x: number[], y: number[], x_mean: number): regress_simple;
647 * cordinary least squares for simple linear regression
648 * @param x predictor data, specified as a numeric matrix
649 * @param y response data, specified as a numeric vector
650 * @param y_mean mean of response data
652 olsy(x: number[], y: number[], y_mean: number): regress_simple;
654 * cordinary least squares for simple linear regression
655 * @param x predictor data, specified as a numeric matrix
656 * @param y response data, specified as a numeric vector
658 ols(x: number[], y: number[]): regress_simple;
659 /** zeroing for simple linear regression */
660 zero(): regress_simple;
663 /** constructor for simple linear regression */
664 let regress_simple: {
665 new(): regress_simple;
667 * @param coef regression coefficient
669 new(coef: number): regress_simple;
671 * @param coef regression coefficient
672 * @param bias intercept
674 new(coef: number, bias: number): regress_simple;
675 readonly prototype: regress_simple;
679 /** input for transfer function */
680 readonly input: Float64Array | Float32Array;
681 /** output for transfer function */
682 readonly output: Float64Array | Float32Array;
683 /** numerator for transfer function */
684 num: Float64Array | Float32Array;
685 /** denominator for transfer function */
686 den: Float64Array | Float32Array;
688 * set numerator for transfer function
689 * @param num numerator
691 set_num(num: number[]): tf;
693 * set denominator for transfer function
694 * @param den denominator
696 set_den(den: number[]): tf;
698 * calculate for transfer function
699 * @param x transfer function input
700 * @return transfer function output
702 iter(x: number): number;
703 /** zeroing for transfer function */
707 /** constructor for transfer function */
710 * @param num numerator
711 * @param den denominator
713 new(num: number[], den: number[]): tf;
714 readonly prototype: tf;
718 /** total duration */
720 /** constant velocity phase */
722 /** acceleration phase */
724 /** deceleration phase */
726 /** time-interval in which the jerk is constant (j max or j min ) during the acceleration phase */
727 readonly taj: number;
728 /** time-interval in which the jerk is constant (j max or j min ) during the deceleration phase */
729 readonly tdj: number;
730 /** initial position */
732 /** final position */
734 /** initial velocity */
736 /** final velocity */
738 /** maximum velocity */
742 /** maximum acceleration */
744 /** maximum deceleration */
747 * @param jm defines the maximum jerk during system operation
748 * @param am defines the maximum acceleration during system operation
749 * @param vm defines the maximum velocity during system operation
750 * @param p0 defines the initial position
751 * @param p1 defines the final position
752 * @param v0 defines the initial velocity
753 * @param v1 defines the final velocity
754 * @return total duration
756 gen(jm: number, am: number, vm: number, p0: number, p1: number, v0: number, v1: number): number;
758 * calculate position for bell-shaped velocity trajectory
759 * @param x difference between current time and initial time
761 pos(x: number): number;
763 * calculate velocity for bell-shaped velocity trajectory
764 * @param x difference between current time and initial time
766 vel(x: number): number;
768 * calculate acceleration for bell-shaped velocity trajectory
769 * @param x difference between current time and initial time
771 acc(x: number): number;
773 * calculate jerk for bell-shaped velocity trajectory
774 * @param x difference between current time and initial time
776 jer(x: number): number;
779 /** constructor for bell-shaped velocity trajectory */
782 readonly prototype: trajbell;
785 interface trajpoly3 {
786 /** coefficients of position */
787 readonly p: Float64Array | Float32Array;
788 /** coefficients of velocity */
789 readonly v: Float64Array | Float32Array;
790 /** coefficients of acceleration */
791 readonly a: Float64Array | Float32Array;
793 * calculate position for cubic polynomial trajectory
794 * @param x difference between current time and initial time
796 pos(x: number): number;
798 * calculate velocity for cubic polynomial trajectory
799 * @param x difference between current time and initial time
801 vel(x: number): number;
803 * calculate acceleration for cubic polynomial trajectory
804 * @param x difference between current time and initial time
806 acc(x: number): number;
809 /** constructor for cubic polynomial trajectory */
812 * @param ts difference between final time and initial time
813 * @param p0 initial position
814 * @param p1 final position
816 new(ts: number, p0: number, p1: number): trajpoly3;
818 * @param ts difference between final time and initial time
819 * @param p0 initial position
820 * @param p1 final position
821 * @param v0 initial velocity
822 * @param v1 final velocity
824 new(ts: number, p0: number, p1: number, v0: number, v1: number): trajpoly3;
825 readonly prototype: trajpoly3;
828 interface trajpoly5 {
829 /** coefficients of position */
830 readonly p: Float64Array | Float32Array;
831 /** coefficients of velocity */
832 readonly v: Float64Array | Float32Array;
833 /** coefficients of acceleration */
834 readonly a: Float64Array | Float32Array;
836 * calculate position for quintic polynomial trajectory
837 * @param x difference between current time and initial time
839 pos(x: number): number;
841 * calculate velocity for quintic polynomial trajectory
842 * @param x difference between current time and initial time
844 vel(x: number): number;
846 * calculate acceleration for quintic polynomial trajectory
847 * @param x difference between current time and initial time
849 acc(x: number): number;
852 /** constructor for quintic polynomial trajectory */
855 * @param ts difference between final time and initial time
856 * @param p0 initial position
857 * @param p1 final position
859 new(ts: number, p0: number, p1: number): trajpoly5;
861 * @param ts difference between final time and initial time
862 * @param p0 initial position
863 * @param p1 final position
864 * @param v0 initial velocity
865 * @param v1 final velocity
867 new(ts: number, p0: number, p1: number, v0: number, v1: number): trajpoly5;
869 * @param ts difference between final time and initial time
870 * @param p0 initial position
871 * @param p1 final position
872 * @param v0 initial velocity
873 * @param v1 final velocity
874 * @param a0 initial acceleration
875 * @param a1 final acceleration
877 new(ts: number, p0: number, p1: number, v0: number, v1: number, a0: number, a1: number): trajpoly5;
878 readonly prototype: trajpoly5;
881 interface trajpoly7 {
882 /** coefficients of position */
883 readonly p: Float64Array | Float32Array;
884 /** coefficients of velocity */
885 readonly v: Float64Array | Float32Array;
886 /** coefficients of acceleration */
887 readonly a: Float64Array | Float32Array;
888 /** coefficients of jerk */
889 readonly j: Float64Array | Float32Array;
891 * calculate position for hepta polynomial trajectory
892 * @param x difference between current time and initial time
894 pos(x: number): number;
896 * calculate velocity for hepta polynomial trajectory
897 * @param x difference between current time and initial time
899 vel(x: number): number;
901 * calculate acceleration for hepta polynomial trajectory
902 * @param x difference between current time and initial time
904 acc(x: number): number;
906 * calculate jerk for hepta polynomial trajectory
907 * @param x difference between current time and initial time
909 jer(x: number): number;
912 /** constructor for hepta polynomial trajectory */
915 * @param ts difference between final time and initial time
916 * @param p0 initial position
917 * @param p1 final position
919 new(ts: number, p0: number, p1: number): trajpoly7;
921 * @param ts difference between final time and initial time
922 * @param p0 initial position
923 * @param p1 final position
924 * @param v0 initial velocity
925 * @param v1 final velocity
927 new(ts: number, p0: number, p1: number, v0: number, v1: number): trajpoly7;
929 * @param ts difference between final time and initial time
930 * @param p0 initial position
931 * @param p1 final position
932 * @param v0 initial velocity
933 * @param v1 final velocity
934 * @param a0 initial acceleration
935 * @param a1 final acceleration
937 new(ts: number, p0: number, p1: number, v0: number, v1: number, a0: number, a1: number): trajpoly7;
939 * @param ts difference between final time and initial time
940 * @param p0 initial position
941 * @param p1 final position
942 * @param v0 initial velocity
943 * @param v1 final velocity
944 * @param a0 initial acceleration
945 * @param a1 final acceleration
946 * @param j0 initial jerk
947 * @param j1 final jerk
949 new(ts: number, p0: number, p1: number, v0: number, v1: number, a0: number, a1: number, j0: number, j1: number): trajpoly7;
950 readonly prototype: trajpoly7;
954 /** total duration */
956 /** initial position */
958 /** final position */
960 /** initial velocity */
962 /** final velocity */
964 /** constant velocity */
966 /** time before constant velocity */
968 /** time after constant velocity */
970 /** position before constant velocity */
972 /** position after constant velocity */
974 /** acceleration before constant velocity */
976 /** acceleration after constant velocity */
979 * @param vm defines the maximum velocity during system operation
980 * @param ac defines the acceleration before constant velocity
981 * @param de defines the acceleration after constant velocity
982 * @param p0 defines the initial position
983 * @param p1 defines the final position
984 * @param v0 defines the initial velocity
985 * @param v1 defines the final velocity
986 * @return total duration
988 gen(vm: number, ac: number, de: number, p0: number, p1: number, v0: number, v1: number): number;
990 * calculate position for trapezoidal velocity trajectory
991 * @param x difference between current time and initial time
993 pos(x: number): number;
995 * calculate velocity for trapezoidal velocity trajectory
996 * @param x difference between current time and initial time
998 vel(x: number): number;
1000 * calculate acceleration for trapezoidal velocity trajectory
1001 * @param x difference between current time and initial time
1003 acc(x: number): number;
1006 /** constructor for trapezoidal velocity trajectory */
1009 readonly prototype: trajtrap;
1024 * parse for version string
1025 * @param ver version string to be parsed
1027 parse(ver: string): version;
1029 * compare this version with that version
1030 * @param ver version to be compared
1032 cmp(ver: version): number;
1034 * this version is less than that version
1035 * @param ver version to be compared
1037 lt(ver: version): boolean;
1039 * this version is greater than that version
1040 * @param ver version to be compared
1042 gt(ver: version): boolean;
1044 * this version is less than or equal to that version
1045 * @param ver version to be compared
1047 le(ver: version): boolean;
1049 * this version is greater than or equal to that version
1050 * @param ver version to be compared
1052 ge(ver: version): boolean;
1054 * this version is equal to that version
1055 * @param ver version to be compared
1057 eq(ver: version): boolean;
1059 * this version is not equal to that version
1060 * @param ver version to be compared
1062 ne(ver: version): boolean;
1063 /** return string representation of version */
1067 /** constructor for version */
1070 * @param major major number
1071 * @param minor minor number
1072 * @param third third number
1073 * @param extra extra number
1075 new(major?: number, minor?: number, third?: number, extra?: number): version;
1077 * algorithm library version check
1078 * @param major required major number
1079 * @param minor required minor number
1080 * @param patch required patch number
1081 * @returns -3(<major),-2(<minor),-1(<patch),0,+1(>patch),+2(>minor),+3(>major)
1083 check(major: number, minor: number, patch: number): number;
1084 /** algorithm library version major */
1086 /** algorithm library version minor */
1088 /** algorithm library version patch */
1090 /** algorithm library version tweak */
1092 readonly prototype: version;
1095 /** algorithm library version string */
1096 const VERSION: string;