update options for pip installation in README.md
[liba.git] / lua / liba.lua
blob445474b8c8feda08c24d751ddfc6df5c9d516971
1 ---@meta liba
2 local liba = {}
4 ---@param ... integer
5 ---@return integer ...
6 function liba.isqrt(...) end
8 ---@param ... number
9 ---@return number ...
10 function liba.rsqrt(...) end
12 ---@param str? string
13 ---@param val? integer|string
14 ---@return string
15 function liba.hash_bkdr(str, val) end
17 ---@param str? string
18 ---@param val? integer|string
19 ---@return string
20 function liba.hash_sdbm(str, val) end
22 ---@class a.complex
23 ---@field real number
24 ---@field imag number
25 ---@field rho number
26 ---@field theta number
27 ---@operator len: number
28 ---@operator unm: a.complex
29 ---@operator add(a.complex): a.complex
30 ---@operator sub(a.complex): a.complex
31 ---@operator mul(a.complex): a.complex
32 ---@operator div(a.complex): a.complex
33 ---@operator pow(a.complex): a.complex
34 local complex = {}
35 ---@class liba.complex
36 ---@overload fun(real?: a.complex|number|string, imag?: number): a.complex
37 liba.complex = {}
39 ---@param real? a.complex|number|string
40 ---@param imag? number
41 ---@return a.complex
42 function liba.complex.new(real, imag) end
44 ---@param real? a.complex|number|string
45 ---@param imag? number
46 ---@return a.complex
47 function complex.new(real, imag) end
49 ---@param real? number
50 ---@param imag? number
51 ---@return a.complex
52 function liba.complex.rect(real, imag) end
54 ---@param real? number
55 ---@param imag? number
56 ---@return a.complex
57 function complex.rect(real, imag) end
59 ---@param rho? number
60 ---@param theta? number
61 ---@return a.complex
62 function liba.complex.polar(rho, theta) end
64 ---@param rho? number
65 ---@param theta? number
66 ---@return a.complex
67 function complex.polar(rho, theta) end
69 ---@param z a.complex|number|string
70 ---@return number
71 function liba.complex.logabs(z) end
73 ---@return number
74 function complex:logabs() end
76 ---@param z a.complex|number|string
77 ---@return number
78 function liba.complex.abs2(z) end
80 ---@return number
81 function complex:abs2() end
83 ---@param z a.complex|number|string
84 ---@return number
85 function liba.complex.abs(z) end
87 ---@return number
88 function complex:abs() end
90 ---@param z a.complex|number|string
91 ---@return number
92 function liba.complex.arg(z) end
94 ---@return number
95 function complex:arg() end
97 ---@param z a.complex|number|string
98 ---@return a.complex
99 function liba.complex.proj(z) end
101 ---@return a.complex
102 function complex:proj() end
104 ---@param z a.complex|number|string
105 ---@return a.complex
106 function liba.complex.conj(z) end
108 ---@return a.complex
109 function complex:conj() end
111 ---@param z a.complex|number|string
112 ---@return a.complex
113 function liba.complex.unm(z) end
115 ---@return a.complex
116 function complex:unm() end
118 ---@param z a.complex|number|string
119 ---@return a.complex
120 function liba.complex.inv(z) end
122 ---@return a.complex
123 function complex:inv() end
125 ---@param x a.complex|number|string
126 ---@param y a.complex|number|string
127 ---@return a.complex
128 function liba.complex.add(x, y) end
130 ---@param z a.complex|number|string
131 ---@return a.complex
132 function complex:add(z) end
134 ---@param x a.complex|number|string
135 ---@param y a.complex|number|string
136 ---@return a.complex
137 function liba.complex.sub(x, y) end
139 ---@param z a.complex|number|string
140 ---@return a.complex
141 function complex:sub(z) end
143 ---@param x a.complex|number|string
144 ---@param y a.complex|number|string
145 ---@return a.complex
146 function liba.complex.mul(x, y) end
148 ---@param z a.complex|number|string
149 ---@return a.complex
150 function complex:mul(z) end
152 ---@param x a.complex|number|string
153 ---@param y a.complex|number|string
154 ---@return a.complex
155 function liba.complex.div(x, y) end
157 ---@param z a.complex|number|string
158 ---@return a.complex
159 function complex:div(z) end
161 ---@param z a.complex|number|string
162 ---@param a a.complex|number|string
163 ---@return a.complex
164 function liba.complex.pow(z, a) end
166 ---@param a a.complex|number|string
167 ---@return a.complex
168 function complex:pow(a) end
170 ---@param z a.complex|number|string
171 ---@param b a.complex|number|string
172 ---@return a.complex
173 function liba.complex.logb(z, b) end
175 ---@param b a.complex
176 ---@return a.complex
177 function complex:logb(b) end
179 ---@param z a.complex|number|string
180 ---@return a.complex
181 function liba.complex.exp(z) end
183 ---@return a.complex
184 function complex:exp() end
186 ---@param z a.complex|number|string
187 ---@return a.complex
188 function liba.complex.log(z) end
190 ---@return a.complex
191 function complex:log() end
193 ---@param z a.complex|number|string
194 ---@return a.complex
195 function liba.complex.sqrt(z) end
197 ---@return a.complex
198 function complex:sqrt() end
200 ---@param z a.complex|number|string
201 ---@return a.complex
202 function liba.complex.log2(z) end
204 ---@return a.complex
205 function complex:log2() end
207 ---@param z a.complex|number|string
208 ---@return a.complex
209 function liba.complex.log10(z) end
211 ---@return a.complex
212 function complex:log10() end
214 ---@param z a.complex|number|string
215 ---@return a.complex
216 function liba.complex.sin(z) end
218 ---@return a.complex
219 function complex:sin() end
221 ---@param z a.complex|number|string
222 ---@return a.complex
223 function liba.complex.cos(z) end
225 ---@return a.complex
226 function complex:cos() end
228 ---@param z a.complex|number|string
229 ---@return a.complex
230 function liba.complex.tan(z) end
232 ---@return a.complex
233 function complex:tan() end
235 ---@param z a.complex|number|string
236 ---@return a.complex
237 function liba.complex.sec(z) end
239 ---@return a.complex
240 function complex:sec() end
242 ---@param z a.complex|number|string
243 ---@return a.complex
244 function liba.complex.csc(z) end
246 ---@return a.complex
247 function complex:csc() end
249 ---@param z a.complex|number|string
250 ---@return a.complex
251 function liba.complex.cot(z) end
253 ---@return a.complex
254 function complex:cot() end
256 ---@param z a.complex|number|string
257 ---@return a.complex
258 function liba.complex.asin(z) end
260 ---@return a.complex
261 function complex:asin() end
263 ---@param z a.complex|number|string
264 ---@return a.complex
265 function liba.complex.acos(z) end
267 ---@return a.complex
268 function complex:acos() end
270 ---@param z a.complex|number|string
271 ---@return a.complex
272 function liba.complex.atan(z) end
274 ---@return a.complex
275 function complex:atan() end
277 ---@param z a.complex|number|string
278 ---@return a.complex
279 function liba.complex.asec(z) end
281 ---@return a.complex
282 function complex:asec() end
284 ---@param z a.complex|number|string
285 ---@return a.complex
286 function liba.complex.acsc(z) end
288 ---@return a.complex
289 function complex:acsc() end
291 ---@param z a.complex|number|string
292 ---@return a.complex
293 function liba.complex.acot(z) end
295 ---@return a.complex
296 function complex:acot() end
298 ---@param z a.complex|number|string
299 ---@return a.complex
300 function liba.complex.sinh(z) end
302 ---@return a.complex
303 function complex:sinh() end
305 ---@param z a.complex|number|string
306 ---@return a.complex
307 function liba.complex.cosh(z) end
309 ---@return a.complex
310 function complex:cosh() end
312 ---@param z a.complex|number|string
313 ---@return a.complex
314 function liba.complex.tanh(z) end
316 ---@return a.complex
317 function complex:tanh() end
319 ---@param z a.complex|number|string
320 ---@return a.complex
321 function liba.complex.sech(z) end
323 ---@return a.complex
324 function complex:sech() end
326 ---@param z a.complex|number|string
327 ---@return a.complex
328 function liba.complex.csch(z) end
330 ---@return a.complex
331 function complex:csch() end
333 ---@param z a.complex|number|string
334 ---@return a.complex
335 function liba.complex.coth(z) end
337 ---@return a.complex
338 function complex:coth() end
340 ---@param z a.complex|number|string
341 ---@return a.complex
342 function liba.complex.asinh(z) end
344 ---@return a.complex
345 function complex:asinh() end
347 ---@param z a.complex|number|string
348 ---@return a.complex
349 function liba.complex.acosh(z) end
351 ---@return a.complex
352 function complex:acosh() end
354 ---@param z a.complex|number|string
355 ---@return a.complex
356 function liba.complex.atanh(z) end
358 ---@return a.complex
359 function complex:atanh() end
361 ---@param z a.complex|number|string
362 ---@return a.complex
363 function liba.complex.asech(z) end
365 ---@return a.complex
366 function complex:asech() end
368 ---@param z a.complex|number|string
369 ---@return a.complex
370 function liba.complex.acsch(z) end
372 ---@return a.complex
373 function complex:acsch() end
375 ---@param z a.complex|number|string
376 ---@return a.complex
377 function liba.complex.acoth(z) end
379 ---@return a.complex
380 function complex:acoth() end
382 ---@class a.crc8
383 ---@field table table
384 ---@overload fun(block: string, value: integer|string): integer
385 local crc8 = {}
386 ---@class liba.crc8
387 ---@overload fun(poly: integer|string, reversed?: boolean): a.crc8
388 liba.crc8 = {}
390 ---@param poly integer|string
391 ---@param reversed? boolean
392 ---@return a.crc8
393 function liba.crc8.new(poly, reversed) end
395 ---@param poly integer|string
396 ---@param reversed? boolean
397 ---@return a.crc8
398 function crc8.new(poly, reversed) end
400 ---@param ctx a.crc8
401 ---@param poly integer|string
402 ---@param reversed? boolean
403 ---@return a.crc8
404 function liba.crc8.gen(ctx, poly, reversed) end
406 ---@param poly integer|string
407 ---@param reversed? boolean
408 ---@return a.crc8
409 function crc8:gen(poly, reversed) end
411 ---@param ctx a.crc8
412 ---@param block string
413 ---@param value? integer|string
414 ---@return integer
415 function liba.crc8.eval(ctx, block, value) end
417 ---@param block string
418 ---@param value? integer|string
419 ---@return integer
420 function crc8:eval(block, value) end
422 ---@param ctx a.crc8
423 ---@param block string
424 ---@param value? integer|string
425 ---@return string
426 function liba.crc8.pack(ctx, block, value) end
428 ---@param block string
429 ---@param value? integer|string
430 ---@return string
431 function crc8:pack(block, value) end
433 ---@class a.crc16
434 ---@field table table
435 ---@overload fun(block: string, value: integer|string): integer
436 local crc16 = {}
437 ---@class liba.crc16
438 ---@overload fun(poly: integer|string, reversed?: boolean): a.crc16
439 liba.crc16 = {}
441 ---@param poly integer|string
442 ---@param reversed? boolean
443 ---@return a.crc16
444 function liba.crc16.new(poly, reversed) end
446 ---@param poly integer|string
447 ---@param reversed? boolean
448 ---@return a.crc16
449 function crc16.new(poly, reversed) end
451 ---@param ctx a.crc16
452 ---@param poly integer|string
453 ---@param reversed? boolean
454 ---@return a.crc16
455 function liba.crc16.gen(ctx, poly, reversed) end
457 ---@param poly integer|string
458 ---@param reversed? boolean
459 ---@return a.crc16
460 function crc16:gen(poly, reversed) end
462 ---@param ctx a.crc16
463 ---@param block string
464 ---@param value? integer|string
465 ---@return integer
466 function liba.crc16.eval(ctx, block, value) end
468 ---@param block string
469 ---@param value? integer|string
470 ---@return integer
471 function crc16:eval(block, value) end
473 ---@param ctx a.crc16
474 ---@param block string
475 ---@param value? integer|string
476 ---@return string
477 function liba.crc16.pack(ctx, block, value) end
479 ---@param block string
480 ---@param value? integer|string
481 ---@return string
482 function crc16:pack(block, value) end
484 ---@class a.crc32
485 ---@field table table
486 ---@overload fun(block: string, value: integer|string): string
487 local crc32 = {}
488 ---@class liba.crc32
489 ---@overload fun(poly: integer|string, reversed?: boolean): a.crc32
490 liba.crc32 = {}
492 ---@param poly integer|string
493 ---@param reversed? boolean
494 ---@return a.crc32
495 function liba.crc32.new(poly, reversed) end
497 ---@param poly integer|string
498 ---@param reversed? boolean
499 ---@return a.crc32
500 function crc32.new(poly, reversed) end
502 ---@param ctx a.crc32
503 ---@param poly integer|string
504 ---@param reversed? boolean
505 ---@return a.crc32
506 function liba.crc32.gen(ctx, poly, reversed) end
508 ---@param poly integer|string
509 ---@param reversed? boolean
510 ---@return a.crc32
511 function crc32:gen(poly, reversed) end
513 ---@param ctx a.crc32
514 ---@param block string
515 ---@param value? integer|string
516 ---@return string
517 function liba.crc32.eval(ctx, block, value) end
519 ---@param block string
520 ---@param value? integer|string
521 ---@return string
522 function crc32:eval(block, value) end
524 ---@param ctx a.crc32
525 ---@param block string
526 ---@param value? integer|string
527 ---@return string
528 function liba.crc32.pack(ctx, block, value) end
530 ---@param block string
531 ---@param value? integer|string
532 ---@return string
533 function crc32:pack(block, value) end
535 ---@class a.crc64
536 ---@field table table
537 ---@overload fun(block: string, value: integer|string): string
538 local crc64 = {}
539 ---@class liba.crc64
540 ---@overload fun(poly: integer|string, reversed?: boolean): a.crc64
541 liba.crc64 = {}
543 ---@param poly integer|string
544 ---@param reversed? boolean
545 ---@return a.crc64
546 function liba.crc64.new(poly, reversed) end
548 ---@param poly integer|string
549 ---@param reversed? boolean
550 ---@return a.crc64
551 function crc64.new(poly, reversed) end
553 ---@param ctx a.crc64
554 ---@param poly integer|string
555 ---@param reversed? boolean
556 ---@return a.crc64
557 function liba.crc64.gen(ctx, poly, reversed) end
559 ---@param poly integer|string
560 ---@param reversed? boolean
561 ---@return a.crc64
562 function crc64:gen(poly, reversed) end
564 ---@param ctx a.crc64
565 ---@param block string
566 ---@param value? integer|string
567 ---@return string
568 function liba.crc64.eval(ctx, block, value) end
570 ---@param block string
571 ---@param value? integer|string
572 ---@return string
573 function crc64:eval(block, value) end
575 ---@param ctx a.crc64
576 ---@param block string
577 ---@param value? integer|string
578 ---@return string
579 function liba.crc64.pack(ctx, block, value) end
581 ---@param block string
582 ---@param value? integer|string
583 ---@return string
584 function crc64:pack(block, value) end
586 ---@class a.hpf
587 ---@field alpha number
588 ---@field input number
589 ---@field output number
590 ---@overload fun(x: number): number
591 local hpf = {}
592 ---@class liba.hpf
593 ---@overload fun(alpha: number): a.hpf
594 ---@overload fun(fc: number, ts: number): a.hpf
595 liba.hpf = {}
597 ---@param fc number
598 ---@param ts number
599 ---@return a.hpf
600 ---@overload fun(alpha: number): a.hpf
601 function liba.hpf.new(fc, ts) end
603 ---@param fc number
604 ---@param ts number
605 ---@return a.hpf
606 ---@overload fun(alpha: number): a.hpf
607 function hpf.new(fc, ts) end
609 ---@param ctx a.hpf
610 ---@param fc number
611 ---@param ts number
612 ---@return a.hpf
613 ---@overload fun(ctx: a.hpf, alpha: number): a.hpf
614 function liba.hpf.gen(ctx, fc, ts) end
616 ---@param fc number
617 ---@param ts number
618 ---@return a.hpf
619 ---@overload fun(ctx: a.hpf, alpha: number): a.hpf
620 function hpf:gen(fc, ts) end
622 ---@param ctx a.hpf
623 ---@param x number
624 ---@return number
625 function liba.hpf.iter(ctx, x) end
627 ---@param x number
628 ---@return number
629 function hpf:iter(x) end
631 ---@param ctx a.hpf
632 ---@return a.hpf
633 function liba.hpf.zero(ctx) end
635 ---@return a.hpf
636 function hpf:zero() end
638 ---@class a.lpf
639 ---@field alpha number
640 ---@field output number
641 ---@overload fun(x: number): number
642 local lpf = {}
643 ---@class liba.lpf
644 ---@overload fun(alpha: number): a.lpf
645 ---@overload fun(fc: number, ts: number): a.lpf
646 liba.lpf = {}
648 ---@param fc number
649 ---@param ts number
650 ---@return a.lpf
651 ---@overload fun(alpha: number): a.lpf
652 function liba.lpf.new(fc, ts) end
654 ---@param fc number
655 ---@param ts number
656 ---@return a.lpf
657 ---@overload fun(alpha: number): a.lpf
658 function lpf.new(fc, ts) end
660 ---@param ctx a.lpf
661 ---@param fc number
662 ---@param ts number
663 ---@return a.lpf
664 ---@overload fun(ctx: a.lpf, alpha: number): a.lpf
665 function liba.lpf.gen(ctx, fc, ts) end
667 ---@param fc number
668 ---@param ts number
669 ---@return a.lpf
670 ---@overload fun(ctx: a.lpf, alpha: number): a.lpf
671 function lpf:gen(fc, ts) end
673 ---@param ctx a.lpf
674 ---@param x number
675 ---@return number
676 function liba.lpf.iter(ctx, x) end
678 ---@param x number
679 ---@return number
680 function lpf:iter(x) end
682 ---@param ctx a.lpf
683 ---@return a.lpf
684 function liba.lpf.zero(ctx) end
686 ---@return a.lpf
687 function lpf:zero() end
689 liba.mf = {}
690 liba.mf.NUL = 0
691 ---@param e integer
692 ---@param x number
693 ---@param ... number
694 function liba.mf.mf(e, x, ...) end
696 liba.mf.GAUSS = 1
697 ---@param x number
698 ---@param sigma number
699 ---@param c number
700 ---@return number
701 function liba.mf.gauss(x, sigma, c) end
703 liba.mf.GAUSS2 = 2
704 ---@param x number
705 ---@param sigma1 number
706 ---@param c1 number
707 ---@param sigma2 number
708 ---@param c2 number
709 ---@return number
710 function liba.mf.gauss2(x, sigma1, c1, sigma2, c2) end
712 liba.mf.GBELL = 3
713 ---@param x number
714 ---@param a number
715 ---@param b number
716 ---@param c number
717 ---@return number
718 function liba.mf.gbell(x, a, b, c) end
720 liba.mf.SIG = 4
721 ---@param x number
722 ---@param a number
723 ---@param c number
724 ---@return number
725 function liba.mf.sig(x, a, c) end
727 liba.mf.DSIG = 5
728 ---@param x number
729 ---@param a1 number
730 ---@param c1 number
731 ---@param a2 number
732 ---@param c2 number
733 ---@return number
734 function liba.mf.dsig(x, a1, c1, a2, c2) end
736 liba.mf.PSIG = 6
737 ---@param x number
738 ---@param a1 number
739 ---@param c1 number
740 ---@param a2 number
741 ---@param c2 number
742 ---@return number
743 function liba.mf.psig(x, a1, c1, a2, c2) end
745 liba.mf.TRAP = 7
746 ---@param x number
747 ---@param a number
748 ---@param b number
749 ---@param c number
750 ---@param d number
751 ---@return number
752 function liba.mf.trap(x, a, b, c, d) end
754 liba.mf.TRI = 8
755 ---@param x number
756 ---@param a number
757 ---@param b number
758 ---@param c number
759 ---@return number
760 function liba.mf.tri(x, a, b, c) end
762 liba.mf.LINS = 9
763 ---@param x number
764 ---@param a number
765 ---@param b number
766 ---@return number
767 function liba.mf.lins(x, a, b) end
769 liba.mf.LINZ = 10
770 ---@param x number
771 ---@param a number
772 ---@param b number
773 ---@return number
774 function liba.mf.linz(x, a, b) end
776 liba.mf.S = 11
777 ---@param x number
778 ---@param a number
779 ---@param b number
780 ---@return number
781 function liba.mf.s(x, a, b) end
783 liba.mf.Z = 12
784 ---@param x number
785 ---@param a number
786 ---@param b number
787 ---@return number
788 function liba.mf.z(x, a, b) end
790 liba.mf.PI = 13
791 ---@param x number
792 ---@param a number
793 ---@param b number
794 ---@param c number
795 ---@param d number
796 ---@return number
797 function liba.mf.pi(x, a, b, c, d) end
799 ---@class a.pid
800 ---@field kp number
801 ---@field ki number
802 ---@field kd number
803 ---@field summax number
804 ---@field summin number
805 ---@field sum number
806 ---@field outmax number
807 ---@field outmin number
808 ---@field out number
809 ---@field fdb number
810 ---@field err number
811 local pid = {}
812 ---@class liba.pid
813 ---@overload fun(): a.pid
814 liba.pid = {}
816 ---@return a.pid
817 function liba.pid.new() end
819 ---@return a.pid
820 function pid.new() end
822 ---@param ctx a.pid
823 ---@return a.pid
824 function liba.pid.init(ctx) end
826 ---@return a.pid
827 function pid:init() end
829 ---@param ctx a.pid
830 ---@return a.pid
831 function liba.pid.zero(ctx) end
833 ---@return a.pid
834 function pid:zero() end
836 ---@param ctx a.pid
837 ---@param kp number
838 ---@param ki number
839 ---@param kd number
840 ---@return a.pid
841 function liba.pid.kpid(ctx, kp, ki, kd) end
843 ---@param kp number
844 ---@param ki number
845 ---@param kd number
846 ---@return a.pid
847 function pid:kpid(kp, ki, kd) end
849 ---@param ctx a.pid
850 ---@param set number
851 ---@param fdb number
852 ---@return number
853 function liba.pid.run(ctx, set, fdb) end
855 ---@param set number
856 ---@param fdb number
857 ---@return number
858 function pid:run(set, fdb) end
860 ---@param ctx a.pid
861 ---@param set number
862 ---@param fdb number
863 ---@return number
864 function liba.pid.pos(ctx, set, fdb) end
866 ---@param set number
867 ---@param fdb number
868 ---@return number
869 function pid:pos(set, fdb) end
871 ---@param ctx a.pid
872 ---@param set number
873 ---@param fdb number
874 ---@return number
875 function liba.pid.inc(ctx, set, fdb) end
877 ---@param set number
878 ---@param fdb number
879 ---@return number
880 function pid:inc(set, fdb) end
882 ---@class a.pid_fuzzy
883 ---@field kp number
884 ---@field ki number
885 ---@field kd number
886 ---@field summax number
887 ---@field summin number
888 ---@field sum number
889 ---@field outmax number
890 ---@field outmin number
891 ---@field out number
892 ---@field fdb number
893 ---@field err number
894 ---@field order integer
895 ---@field block integer
896 local pid_fuzzy = {}
897 ---@class liba.pid_fuzzy
898 ---@overload fun(): a.pid_fuzzy
899 liba.pid_fuzzy = {}
901 ---@return a.pid_fuzzy
902 function liba.pid_fuzzy.new() end
904 ---@return a.pid_fuzzy
905 function pid_fuzzy.new() end
907 ---@param ctx a.pid_fuzzy
908 ---@return a.pid_fuzzy
909 function liba.pid_fuzzy.init(ctx) end
911 ---@return a.pid_fuzzy
912 function pid_fuzzy:init() end
914 ---@param ctx a.pid_fuzzy
915 ---@return a.pid_fuzzy
916 function liba.pid_fuzzy.zero(ctx) end
918 ---@return a.pid_fuzzy
919 function pid_fuzzy:zero() end
921 ---@param ctx a.pid_fuzzy
922 ---@param me table
923 ---@param mec table
924 ---@param mkp table
925 ---@param mki table
926 ---@param mkd table
927 ---@return a.pid_fuzzy
928 function liba.pid_fuzzy.rule(ctx, me, mec, mkp, mki, mkd) end
930 ---@param me table
931 ---@param mec table
932 ---@param mkp table
933 ---@param mki table
934 ---@param mkd table
935 ---@return a.pid_fuzzy
936 function pid_fuzzy:rule(me, mec, mkp, mki, mkd) end
938 liba.pid_fuzzy.CAP = 1
939 liba.pid_fuzzy.CAP_ALGEBRA = 2
940 liba.pid_fuzzy.CAP_BOUNDED = 3
941 liba.pid_fuzzy.CUP = 4
942 liba.pid_fuzzy.CUP_ALGEBRA = 5
943 liba.pid_fuzzy.CUP_BOUNDED = 6
944 liba.pid_fuzzy.EQU = 0
945 ---@param ctx a.pid_fuzzy
946 ---@param op integer
947 ---@return a.pid_fuzzy
948 function liba.pid_fuzzy.op(ctx, op) end
950 ---@param op integer
951 ---@return a.pid_fuzzy
952 function pid_fuzzy:op(op) end
954 ---@param ctx a.pid_fuzzy
955 ---@param block integer
956 ---@return a.pid_fuzzy
957 function liba.pid_fuzzy.set_block(ctx, block) end
959 ---@param block integer
960 ---@return a.pid_fuzzy
961 function pid_fuzzy:set_block(block) end
963 ---@param ctx a.pid_fuzzy
964 ---@param kp number
965 ---@param ki number
966 ---@param kd number
967 ---@return a.pid_fuzzy
968 function liba.pid_fuzzy.kpid(ctx, kp, ki, kd) end
970 ---@param kp number
971 ---@param ki number
972 ---@param kd number
973 ---@return a.pid_fuzzy
974 function pid_fuzzy:kpid(kp, ki, kd) end
976 ---@param ctx a.pid_fuzzy
977 ---@param set number
978 ---@param fdb number
979 ---@return number
980 function liba.pid_fuzzy.run(ctx, set, fdb) end
982 ---@param set number
983 ---@param fdb number
984 ---@return number
985 function pid_fuzzy:run(set, fdb) end
987 ---@param ctx a.pid_fuzzy
988 ---@param set number
989 ---@param fdb number
990 ---@return number
991 function liba.pid_fuzzy.pos(ctx, set, fdb) end
993 ---@param set number
994 ---@param fdb number
995 ---@return number
996 function pid_fuzzy:pos(set, fdb) end
998 ---@param ctx a.pid_fuzzy
999 ---@param set number
1000 ---@param fdb number
1001 ---@return number
1002 function liba.pid_fuzzy.inc(ctx, set, fdb) end
1004 ---@param set number
1005 ---@param fdb number
1006 ---@return number
1007 function pid_fuzzy:inc(set, fdb) end
1009 ---@class a.pid_neuro
1010 ---@field k number
1011 ---@field kp number
1012 ---@field ki number
1013 ---@field kd number
1014 ---@field wp number
1015 ---@field wi number
1016 ---@field wd number
1017 ---@field outmax number
1018 ---@field outmin number
1019 ---@field out number
1020 ---@field fdb number
1021 ---@field err number
1022 ---@field ec number
1023 local pid_neuro = {}
1024 ---@class liba.pid_neuro
1025 ---@overload fun(): a.pid_neuro
1026 liba.pid_neuro = {}
1028 ---@return a.pid_neuro
1029 function liba.pid_neuro.new() end
1031 ---@return a.pid_neuro
1032 function pid_neuro.new() end
1034 ---@param ctx a.pid_neuro
1035 ---@return a.pid_neuro
1036 function liba.pid_neuro.init(ctx) end
1038 ---@return a.pid_neuro
1039 function pid_neuro:init() end
1041 ---@param ctx a.pid_neuro
1042 ---@return a.pid_neuro
1043 function liba.pid_neuro.zero(ctx) end
1045 ---@return a.pid_neuro
1046 function pid_neuro:zero() end
1048 ---@param ctx a.pid_neuro
1049 ---@param k number
1050 ---@param kp number
1051 ---@param ki number
1052 ---@param kd number
1053 ---@return a.pid_neuro
1054 function liba.pid_neuro.kpid(ctx, k, kp, ki, kd) end
1056 ---@param k number
1057 ---@param kp number
1058 ---@param ki number
1059 ---@param kd number
1060 ---@return a.pid_neuro
1061 function pid_neuro:kpid(k, kp, ki, kd) end
1063 ---@param ctx a.pid_neuro
1064 ---@param wp number
1065 ---@param wi number
1066 ---@param wd number
1067 ---@return a.pid_neuro
1068 function liba.pid_neuro.wpid(ctx, wp, wi, wd) end
1070 ---@param wp number
1071 ---@param wi number
1072 ---@param wd number
1073 ---@return a.pid_neuro
1074 function pid_neuro:wpid(wp, wi, wd) end
1076 ---@param ctx a.pid_neuro
1077 ---@param set number
1078 ---@param fdb number
1079 ---@return number
1080 function liba.pid_neuro.run(ctx, set, fdb) end
1082 ---@param set number
1083 ---@param fdb number
1084 ---@return number
1085 function pid_neuro:run(set, fdb) end
1087 ---@param ctx a.pid_neuro
1088 ---@param set number
1089 ---@param fdb number
1090 ---@return number
1091 function liba.pid_neuro.inc(ctx, set, fdb) end
1093 ---@param set number
1094 ---@param fdb number
1095 ---@return number
1096 function pid_neuro:inc(set, fdb) end
1098 ---@class a.tf
1099 ---@field num table
1100 ---@field den table
1101 ---@field input table
1102 ---@field output table
1103 ---@overload fun(x: number): number
1104 local tf = {}
1105 ---@class liba.tf
1106 ---@overload fun(num: table, den: table): a.tf
1107 liba.tf = {}
1109 ---@param num table
1110 ---@param den table
1111 ---@return a.tf
1112 function liba.tf.new(num, den) end
1114 ---@param num table
1115 ---@param den table
1116 ---@return a.tf
1117 function tf.new(num, den) end
1119 ---@param ctx a.tf
1120 function liba.tf.die(ctx) end
1122 function tf:die() end
1124 ---@param ctx a.tf
1125 ---@param num table
1126 ---@param den table
1127 ---@return a.tf
1128 function liba.tf.init(ctx, num, den) end
1130 ---@param num table
1131 ---@param den table
1132 ---@return a.tf
1133 function tf:init(num, den) end
1135 ---@param ctx a.tf
1136 ---@param x number
1137 ---@return number
1138 function liba.tf.iter(ctx, x) end
1140 ---@param x number
1141 ---@return number
1142 function tf:iter(x) end
1144 ---@param ctx a.tf
1145 ---@return a.tf
1146 function liba.tf.zero(ctx) end
1148 ---@return a.tf
1149 function tf:zero() end
1151 ---@class a.trajbell
1152 ---@field t number
1153 ---@field tv number
1154 ---@field ta number
1155 ---@field td number
1156 ---@field taj number
1157 ---@field tdj number
1158 ---@field p0 number
1159 ---@field p1 number
1160 ---@field v0 number
1161 ---@field v1 number
1162 ---@field vm number
1163 ---@field jm number
1164 ---@field am number
1165 ---@field dm number
1166 local trajbell = {}
1167 ---@class liba.trajbell
1168 ---@overload fun(): a.trajbell
1169 liba.trajbell = {}
1171 ---@return a.trajbell
1172 function liba.trajbell.new() end
1174 ---@return a.trajbell
1175 function trajbell.new() end
1177 ---@param ctx a.trajbell
1178 ---@param jm number
1179 ---@param am number
1180 ---@param vm number
1181 ---@param p0 number
1182 ---@param p1 number
1183 ---@param v0? number
1184 ---@param v1? number
1185 ---@return number
1186 function liba.trajbell.gen(ctx, jm, am, vm, p0, p1, v0, v1) end
1188 ---@param jm number
1189 ---@param am number
1190 ---@param vm number
1191 ---@param p0 number
1192 ---@param p1 number
1193 ---@param v0? number
1194 ---@param v1? number
1195 ---@return number
1196 function trajbell:gen(jm, am, vm, p0, p1, v0, v1) end
1198 ---@param ctx a.trajbell
1199 ---@param dt number
1200 ---@return number
1201 function liba.trajbell.pos(ctx, dt) end
1203 ---@param dt number
1204 ---@return number
1205 function trajbell:pos(dt) end
1207 ---@param ctx a.trajbell
1208 ---@param dt number
1209 ---@return number
1210 function liba.trajbell.vel(ctx, dt) end
1212 ---@param dt number
1213 ---@return number
1214 function trajbell:vel(dt) end
1216 ---@param ctx a.trajbell
1217 ---@param dt number
1218 ---@return number
1219 function liba.trajbell.acc(ctx, dt) end
1221 ---@param dt number
1222 ---@return number
1223 function trajbell:acc(dt) end
1225 ---@param ctx a.trajbell
1226 ---@param dt number
1227 ---@return number
1228 function liba.trajbell.jer(ctx, dt) end
1230 ---@param dt number
1231 ---@return number
1232 function trajbell:jer(dt) end
1234 ---@class a.trajpoly3
1235 ---@field p table
1236 ---@field v table
1237 ---@field a table
1238 local trajpoly3 = {}
1239 ---@class liba.trajpoly3
1240 ---@overload fun(ts: number, p0: number, p1: number, v0?: number, v1?: number): a.trajpoly3
1241 liba.trajpoly3 = {}
1243 ---@param ts number
1244 ---@param p0 number
1245 ---@param p1 number
1246 ---@param v0? number
1247 ---@param v1? number
1248 ---@return a.trajpoly3
1249 function liba.trajpoly3.new(ts, p0, p1, v0, v1) end
1251 ---@param ts number
1252 ---@param p0 number
1253 ---@param p1 number
1254 ---@param v0? number
1255 ---@param v1? number
1256 ---@return a.trajpoly3
1257 function trajpoly3.new(ts, p0, p1, v0, v1) end
1259 ---@param ctx a.trajpoly3
1260 ---@param ts number
1261 ---@param p0 number
1262 ---@param p1 number
1263 ---@param v0? number
1264 ---@param v1? number
1265 ---@return a.trajpoly3
1266 function liba.trajpoly3.gen(ctx, ts, p0, p1, v0, v1) end
1268 ---@param ts number
1269 ---@param p0 number
1270 ---@param p1 number
1271 ---@param v0? number
1272 ---@param v1? number
1273 ---@return a.trajpoly3
1274 function trajpoly3:gen(ts, p0, p1, v0, v1) end
1276 ---@param ctx a.trajpoly3
1277 ---@param dt number
1278 ---@return number
1279 function liba.trajpoly3.pos(ctx, dt) end
1281 ---@param dt number
1282 ---@return number
1283 function trajpoly3:pos(dt) end
1285 ---@param ctx a.trajpoly3
1286 ---@param dt number
1287 ---@return number
1288 function liba.trajpoly3.vel(ctx, dt) end
1290 ---@param dt number
1291 ---@return number
1292 function trajpoly3:vel(dt) end
1294 ---@param ctx a.trajpoly3
1295 ---@param dt number
1296 ---@return number
1297 function liba.trajpoly3.acc(ctx, dt) end
1299 ---@param dt number
1300 ---@return number
1301 function trajpoly3:acc(dt) end
1303 ---@class a.trajpoly5
1304 ---@field p table
1305 ---@field v table
1306 ---@field a table
1307 local trajpoly5 = {}
1308 ---@class liba.trajpoly5
1309 ---@overload fun(ts: number, p0: number, p1: number, v0?: number, v1?: number, a0?: number, a1?: number): a.trajpoly5
1310 liba.trajpoly5 = {}
1312 ---@param ts number
1313 ---@param p0 number
1314 ---@param p1 number
1315 ---@param v0? number
1316 ---@param v1? number
1317 ---@param a0? number
1318 ---@param a1? number
1319 ---@return a.trajpoly5
1320 function liba.trajpoly5.new(ts, p0, p1, v0, v1, a0, a1) end
1322 ---@param ts number
1323 ---@param p0 number
1324 ---@param p1 number
1325 ---@param v0? number
1326 ---@param v1? number
1327 ---@param a0? number
1328 ---@param a1? number
1329 ---@return a.trajpoly5
1330 function trajpoly5.new(ts, p0, p1, v0, v1, a0, a1) end
1332 ---@param ctx a.trajpoly5
1333 ---@param ts number
1334 ---@param p0 number
1335 ---@param p1 number
1336 ---@param v0? number
1337 ---@param v1? number
1338 ---@param a0? number
1339 ---@param a1? number
1340 ---@return a.trajpoly5
1341 function liba.trajpoly5.gen(ctx, ts, p0, p1, v0, v1, a0, a1) end
1343 ---@param ts number
1344 ---@param p0 number
1345 ---@param p1 number
1346 ---@param v0? number
1347 ---@param v1? number
1348 ---@param a0? number
1349 ---@param a1? number
1350 ---@return a.trajpoly5
1351 function trajpoly5:gen(ts, p0, p1, v0, v1, a0, a1) end
1353 ---@param ctx a.trajpoly5
1354 ---@param dt number
1355 ---@return number
1356 function liba.trajpoly5.pos(ctx, dt) end
1358 ---@param dt number
1359 ---@return number
1360 function trajpoly5:pos(dt) end
1362 ---@param ctx a.trajpoly5
1363 ---@param dt number
1364 ---@return number
1365 function liba.trajpoly5.vel(ctx, dt) end
1367 ---@param dt number
1368 ---@return number
1369 function trajpoly5:vel(dt) end
1371 ---@param ctx a.trajpoly5
1372 ---@param dt number
1373 ---@return number
1374 function liba.trajpoly5.acc(ctx, dt) end
1376 ---@param dt number
1377 ---@return number
1378 function trajpoly5:acc(dt) end
1380 ---@class a.trajpoly7
1381 ---@field p table
1382 ---@field v table
1383 ---@field a table
1384 ---@field j table
1385 local trajpoly7 = {}
1386 ---@class liba.trajpoly7
1387 ---@overload fun(ts: number, p0: number, p1: number, v0?: number, v1?: number, a0?: number, a1?: number, j0?: number, j1?: number): a.trajpoly7
1388 liba.trajpoly7 = {}
1390 ---@param ts number
1391 ---@param p0 number
1392 ---@param p1 number
1393 ---@param v0? number
1394 ---@param v1? number
1395 ---@param a0? number
1396 ---@param a1? number
1397 ---@param j0? number
1398 ---@param j1? number
1399 ---@return a.trajpoly7
1400 function liba.trajpoly7.new(ts, p0, p1, v0, v1, a0, a1, j0, j1) end
1402 ---@param ts number
1403 ---@param p0 number
1404 ---@param p1 number
1405 ---@param v0? number
1406 ---@param v1? number
1407 ---@param a0? number
1408 ---@param a1? number
1409 ---@param j0? number
1410 ---@param j1? number
1411 ---@return a.trajpoly7
1412 function trajpoly7.new(ts, p0, p1, v0, v1, a0, a1, j0, j1) end
1414 ---@param ctx a.trajpoly7
1415 ---@param ts number
1416 ---@param p0 number
1417 ---@param p1 number
1418 ---@param v0? number
1419 ---@param v1? number
1420 ---@param a0? number
1421 ---@param a1? number
1422 ---@param j0? number
1423 ---@param j1? number
1424 ---@return a.trajpoly7
1425 function liba.trajpoly7.gen(ctx, ts, p0, p1, v0, v1, a0, a1, j0, j1) end
1427 ---@param ts number
1428 ---@param p0 number
1429 ---@param p1 number
1430 ---@param v0? number
1431 ---@param v1? number
1432 ---@param a0? number
1433 ---@param a1? number
1434 ---@param j0? number
1435 ---@param j1? number
1436 ---@return a.trajpoly7
1437 function trajpoly7:gen(ts, p0, p1, v0, v1, a0, a1, j0, j1) end
1439 ---@param ctx a.trajpoly7
1440 ---@param dt number
1441 ---@return number
1442 function liba.trajpoly7.pos(ctx, dt) end
1444 ---@param dt number
1445 ---@return number
1446 function trajpoly7:pos(dt) end
1448 ---@param ctx a.trajpoly7
1449 ---@param dt number
1450 ---@return number
1451 function liba.trajpoly7.vel(ctx, dt) end
1453 ---@param dt number
1454 ---@return number
1455 function trajpoly7:vel(dt) end
1457 ---@param ctx a.trajpoly7
1458 ---@param dt number
1459 ---@return number
1460 function liba.trajpoly7.acc(ctx, dt) end
1462 ---@param dt number
1463 ---@return number
1464 function trajpoly7:acc(dt) end
1466 ---@param ctx a.trajpoly7
1467 ---@param dt number
1468 ---@return number
1469 function liba.trajpoly7.jer(ctx, dt) end
1471 ---@param dt number
1472 ---@return number
1473 function trajpoly7:jer(dt) end
1475 ---@class a.trajtrap
1476 ---@field t number
1477 ---@field p0 number
1478 ---@field p1 number
1479 ---@field v0 number
1480 ---@field v1 number
1481 ---@field vc number
1482 ---@field ta number
1483 ---@field td number
1484 ---@field pa number
1485 ---@field pd number
1486 ---@field ac number
1487 ---@field de number
1488 local trajtrap = {}
1489 ---@class liba.trajtrap
1490 ---@overload fun(): a.trajtrap
1491 liba.trajtrap = {}
1493 ---@return a.trajtrap
1494 function liba.trajtrap.new() end
1496 ---@return a.trajtrap
1497 function trajtrap.new() end
1499 ---@param ctx a.trajtrap
1500 ---@param vm number
1501 ---@param ac number
1502 ---@param de number
1503 ---@param p0 number
1504 ---@param p1 number
1505 ---@param v0? number
1506 ---@param v1? number
1507 ---@return number
1508 function liba.trajtrap.gen(ctx, vm, ac, de, p0, p1, v0, v1) end
1510 ---@param vm number
1511 ---@param ac number
1512 ---@param de number
1513 ---@param p0 number
1514 ---@param p1 number
1515 ---@param v0? number
1516 ---@param v1? number
1517 ---@return number
1518 function trajtrap:gen(vm, ac, de, p0, p1, v0, v1) end
1520 ---@param ctx a.trajtrap
1521 ---@param dt number
1522 ---@return number
1523 function liba.trajtrap.pos(ctx, dt) end
1525 ---@param dt number
1526 ---@return number
1527 function trajtrap:pos(dt) end
1529 ---@param ctx a.trajtrap
1530 ---@param dt number
1531 ---@return number
1532 function liba.trajtrap.vel(ctx, dt) end
1534 ---@param dt number
1535 ---@return number
1536 function trajtrap:vel(dt) end
1538 ---@param ctx a.trajtrap
1539 ---@param dt number
1540 ---@return number
1541 function liba.trajtrap.acc(ctx, dt) end
1543 ---@param dt number
1544 ---@return number
1545 function trajtrap:acc(dt) end
1547 ---@class a.version
1548 ---@field major integer
1549 ---@field minor integer
1550 ---@field third integer
1551 ---@field extra integer
1552 ---@field alpha string
1553 ---@overload fun(major?: integer, minor?: integer, third?: integer, extra?: integer): a.version
1554 ---@overload fun(ver: string): a.version
1555 local version = {}
1556 ---@class liba.version
1557 ---@overload fun(major?: integer, minor?: integer, third?: integer, extra?: integer): a.version
1558 ---@overload fun(ver: string): a.version
1559 liba.version = {}
1560 liba.version.MAJOR = 0
1561 liba.version.MINOR = 0
1562 liba.version.PATCH = 0
1563 liba.version.TWEAK = 0
1565 ---@param major? integer
1566 ---@param minor? integer
1567 ---@param patch? integer
1568 ---@return integer -3,-2,-1,0,1,2,3
1569 function liba.version.check(major, minor, patch) end
1571 ---@param major? integer
1572 ---@param minor? integer
1573 ---@param third? integer
1574 ---@param extra? integer
1575 ---@return a.version
1576 ---@overload fun(ver: string): a.version
1577 function liba.version.new(major, minor, third, extra) end
1579 ---@param major? integer
1580 ---@param minor? integer
1581 ---@param third? integer
1582 ---@param extra? integer
1583 ---@return a.version
1584 ---@overload fun(ver: string): a.version
1585 function version.new(major, minor, third, extra) end
1587 ---@param ctx a.version
1588 ---@param major? integer
1589 ---@param minor? integer
1590 ---@param third? integer
1591 ---@param extra? integer
1592 ---@return a.version
1593 ---@overload fun(ctx: a.version, ver: string): a.version
1594 function liba.version.init(ctx, major, minor, third, extra) end
1596 ---@param major? integer
1597 ---@param minor? integer
1598 ---@param third? integer
1599 ---@param extra? integer
1600 ---@return a.version
1601 ---@overload fun(ver: string): a.version
1602 function version:init(major, minor, third, extra) end
1604 ---@param ctx a.version
1605 ---@param ver string
1606 ---@return a.version
1607 function liba.version.parse(ctx, ver) end
1609 ---@param ver string
1610 ---@return a.version
1611 function version:parse(ver) end
1613 ---@param lhs a.version
1614 ---@param rhs a.version
1615 ---@return integer -3,-2,-1,0,1,2,3
1616 function liba.version.cmp(lhs, rhs) end
1618 ---@param rhs a.version
1619 ---@return integer -3,-2,-1,0,1,2,3
1620 function version:cmp(rhs) end
1622 ---@param lhs a.version
1623 ---@param rhs a.version
1624 ---@return boolean
1625 function liba.version.lt(lhs, rhs) end
1627 ---@param rhs a.version
1628 ---@return boolean
1629 function version:lt(rhs) end
1631 ---@param lhs a.version
1632 ---@param rhs a.version
1633 ---@return boolean
1634 function liba.version.gt(lhs, rhs) end
1636 ---@param rhs a.version
1637 ---@return boolean
1638 function version:gt(rhs) end
1640 ---@param lhs a.version
1641 ---@param rhs a.version
1642 ---@return boolean
1643 function liba.version.le(lhs, rhs) end
1645 ---@param rhs a.version
1646 ---@return boolean
1647 function version:le(rhs) end
1649 ---@param lhs a.version
1650 ---@param rhs a.version
1651 ---@return boolean
1652 function liba.version.ge(lhs, rhs) end
1654 ---@param rhs a.version
1655 ---@return boolean
1656 function version:ge(rhs) end
1658 ---@param lhs a.version
1659 ---@param rhs a.version
1660 ---@return boolean
1661 function liba.version.eq(lhs, rhs) end
1663 ---@param rhs a.version
1664 ---@return boolean
1665 function version:eq(rhs) end
1667 ---@param lhs a.version
1668 ---@param rhs a.version
1669 ---@return boolean
1670 function liba.version.ne(lhs, rhs) end
1672 ---@param rhs a.version
1673 ---@return boolean
1674 function version:ne(rhs) end
1676 liba.VERSION = "0.1.9"
1678 return liba