SearchMode
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
定义搜索行为的模式,在延迟时间与解决方案质量之间取得平衡。在所有模式下,都会强制执行全局请求截止时间。
枚举 |
SEARCH_MODE_UNSPECIFIED |
未指定的搜索模式,等同于 RETURN_FAST 。 |
RETURN_FAST |
找到第一个良好的解决方案后,停止搜索。 |
CONSUME_ALL_AVAILABLE_TIME |
请充分利用所有时间来寻找更好的解决方案。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eSearch mode determines the balance between speed and the quality of solutions found.\u003c/p\u003e\n"],["\u003cp\u003eThree options are available: \u003ccode\u003eRETURN_FAST\u003c/code\u003e prioritizes speed, \u003ccode\u003eCONSUME_ALL_AVAILABLE_TIME\u003c/code\u003e prioritizes solution quality, and \u003ccode\u003eSEARCH_MODE_UNSPECIFIED\u003c/code\u003e defaults to \u003ccode\u003eRETURN_FAST\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAll search modes adhere to the overall request deadline.\u003c/p\u003e\n"]]],["The core content defines search modes that balance latency and solution quality, all adhering to a global deadline. `RETURN_FAST` mode prioritizes speed, halting the search after the initial satisfactory solution. Conversely, `CONSUME_ALL_AVAILABLE_TIME` mode maximizes search duration to improve solution quality. `SEARCH_MODE_UNSPECIFIED` is the default, mirroring the behavior of `RETURN_FAST`. These modes dictate how the system allocates time to finding solutions.\n"],null,["# SearchMode\n\nMode defining the behavior of the search, trading off latency versus solution quality. In all modes, the global request deadline is enforced.\n\n| Enums ||\n|------------------------------|--------------------------------------------------------------|\n| `SEARCH_MODE_UNSPECIFIED` | Unspecified search mode, equivalent to `RETURN_FAST`. |\n| `RETURN_FAST` | Stop the search after finding the first good solution. |\n| `CONSUME_ALL_AVAILABLE_TIME` | Spend all the available time to search for better solutions. |"]]