SearchMode
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.
Chế độ xác định hành vi tìm kiếm, đánh đổi độ trễ so với chất lượng giải pháp. Trong tất cả các chế độ, thời hạn yêu cầu chung đều được thực thi.
Enum |
SEARCH_MODE_UNSPECIFIED |
Chế độ tìm kiếm chưa được chỉ định, tương đương với RETURN_FAST . |
RETURN_FAST |
Hãy ngừng tìm kiếm sau khi tìm được giải pháp phù hợp đầu tiên. |
CONSUME_ALL_AVAILABLE_TIME |
Hãy dành tất cả thời gian có sẵn để tìm kiếm giải pháp tốt hơn. |
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-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\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. |"]]