Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 | 8x 8x | import {stde} from '../stde';
class Cmp extends stde {
constructor(in1_count: number, in2_count: number, preffix_in1?: string, preffix_in2?: string) {
let in_count = Math.max(in1_count, in2_count);
super(
'CMP',
[
...Array.from({length: in1_count}, (_, index) =>
preffix_in1 ? preffix_in1 : 'A_' + String(index + 1)
),
...Array.from({length: in2_count}, (_, index) =>
preffix_in2 ? preffix_in2 : 'B_' + String(index + 1)
)
],
in_count + 1,
(a) => {
return a;
}
);
this.style.preffix_name_out_connection = '$out_';
}
}
function cmp(in1_count: number, in2_count: number, preffix_in1?: string, preffix_in2?: string) {
return new Cmp(in1_count, in2_count, preffix_in1, preffix_in2);
}
export {Cmp, cmp};
|