ee.Array.rightShift
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tính toán dịch chuyển bit sang phải có dấu của v1 theo v2 bit trên cơ sở từng phần tử.
Cách sử dụng | Giá trị trả về |
---|
Array.rightShift(right) | Mảng |
Đối số | Loại | Thông tin chi tiết |
---|
this: left | Mảng | Giá trị bên trái. |
right | Mảng | Giá trị bên phải. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003erightShift\u003c/code\u003e method performs a bitwise signed right shift operation on two arrays.\u003c/p\u003e\n"],["\u003cp\u003eIt shifts the elements of the 'left' array by the number of bits specified in the corresponding elements of the 'right' array.\u003c/p\u003e\n"],["\u003cp\u003eThe result is a new array containing the shifted values.\u003c/p\u003e\n"],["\u003cp\u003eThe original arrays, 'left' and 'right', remain unchanged.\u003c/p\u003e\n"]]],["The core function is an element-wise signed right shift operation. It takes two arrays, `left` and `right`, as input. `left` represents the value being shifted, and `right` specifies the number of bits to shift. The function, `Array.rightShift(right)`, calculates the signed right shift of each element in the `left` array by the corresponding number of bits specified in the `right` array, returning a new `Array` with the shifted results.\n"],null,["# ee.Array.rightShift\n\nOn an element-wise basis, calculates the signed right shift of v1 by v2 bits.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------|---------|\n| Array.rightShift`(right)` | Array |\n\n| Argument | Type | Details |\n|--------------|-------|-----------------------|\n| this: `left` | Array | The left-hand value. |\n| `right` | Array | The right-hand value. |"]]