公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.List.shuffle
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
随机排列指定列表。请注意,对于任何给定的种子,除非种子的值为“false”,否则排列顺序始终相同。
参数 | 类型 | 详细信息 |
---|
此:list | 列表 | |
seed | 对象,默认值:null | 用作随机化种子的长整数。如果传递的是布尔值“false”,则会生成完全随机且不可重现的顺序。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eList.shuffle()\u003c/code\u003e method randomly reorders the elements within a list.\u003c/p\u003e\n"],["\u003cp\u003eProviding a specific \u003ccode\u003eseed\u003c/code\u003e value ensures consistent shuffling results, making the process reproducible.\u003c/p\u003e\n"],["\u003cp\u003eUsing \u003ccode\u003efalse\u003c/code\u003e as the \u003ccode\u003eseed\u003c/code\u003e guarantees a truly random and unrepeatable shuffle.\u003c/p\u003e\n"],["\u003cp\u003eThe method returns the modified list with its elements shuffled according to the specified conditions.\u003c/p\u003e\n"]]],[],null,["# ee.List.shuffle\n\nRandomly permute the specified list. Note that the permutation order will always be the same for any given seed, unless the value for seed is 'false'.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------|---------|\n| List.shuffle`(`*seed*`)` | List |\n\n| Argument | Type | Details |\n|--------------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `list` | List | |\n| `seed` | Object, default: null | A long integer to use as a seed for the randomization. If the boolean value of 'false' is passed, then a completely random and unreproducible order will be generated. |"]]