ee.Reducer.repeat
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ạo một Reducer bằng cách kết hợp số lượng bản sao được chỉ định của reducer đã cho. Tên đầu ra giống với tên của bộ giảm tốc đã cho, nhưng mỗi tên là một danh sách đầu ra tương ứng của từng bộ giảm tốc.
Cách sử dụng | Giá trị trả về |
---|
Reducer.repeat(count) | Bộ giảm tốc |
Đối số | Loại | Thông tin chi tiết |
---|
this: reducer | Bộ giảm tốc | |
count | Số nguyên | Số lượng bản sao của chương trình giảm tải cần kết hợp. |
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\u003eCreates a new Reducer by repeating a given Reducer multiple times.\u003c/p\u003e\n"],["\u003cp\u003eOutput names remain the same but the values are transformed into lists, reflecting outputs from each repetition of the original Reducer.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecount\u003c/code\u003e argument determines the number of repetitions, effectively controlling the length of the output lists.\u003c/p\u003e\n"],["\u003cp\u003ePrimarily used for combining multiple instances of a reducer into a single, unified Reducer.\u003c/p\u003e\n"]]],["Combines multiple copies of a specified reducer into a single Reducer. The `Reducer.repeat(count)` method takes an integer `count` representing the number of reducer copies to merge. It returns a new Reducer. The output names from the combined reducer are identical to the original, but each output is now a list containing the respective output from each of the individual reducers.\n"],null,["# ee.Reducer.repeat\n\nCreates a Reducer by combining the specified number of copies of the given reducer. Output names are the same as the given reducer, but each is a list of the corresponding output from each of the reducers.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------|---------|\n| Reducer.repeat`(count)` | Reducer |\n\n| Argument | Type | Details |\n|-----------------|---------|-------------------------------------------------|\n| this: `reducer` | Reducer | |\n| `count` | Integer | The number of copies of the reducer to combine. |"]]