OR-Tools  9.6
solvers_proto_validation.h
Go to the documentation of this file.
1 // Copyright 2010-2022 Google LLC
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 // you may not use this file except in compliance with the License.
4 // You may obtain a copy of the License at
5 //
6 // http://www.apache.org/licenses/LICENSE-2.0
7 //
8 // Unless required by applicable law or agreed to in writing, software
9 // distributed under the License is distributed on an "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // See the License for the specific language governing permissions and
12 // limitations under the License.
13 
14 // Validation utilities for solvers.proto.
15 
16 #ifndef PDLP_SOLVERS_PROTO_VALIDATION_H_
17 #define PDLP_SOLVERS_PROTO_VALIDATION_H_
18 
19 #include "absl/status/status.h"
20 #include "ortools/pdlp/solvers.pb.h"
21 
22 namespace operations_research::pdlp {
23 
24 // Returns `InvalidArgumentError` if the proto contains invalid values. Returns
25 // `OkStatus` otherwise.
26 absl::Status ValidateTerminationCriteria(const TerminationCriteria& criteria);
27 
28 // Returns `InvalidArgumentError` if the proto contains invalid values. Returns
29 // `OkStatus` otherwise.
31  const AdaptiveLinesearchParams& params);
32 
33 // Returns `InvalidArgumentError` if the proto contains invalid values. Returns
34 // `OkStatus` otherwise.
35 absl::Status ValidateMalitskyPockParams(const MalitskyPockParams& params);
36 
37 // Returns `InvalidArgumentError` if the proto contains invalid values. Returns
38 // `OkStatus` otherwise.
40  const PrimalDualHybridGradientParams& params);
41 
42 } // namespace operations_research::pdlp
43 
44 #endif // PDLP_SOLVERS_PROTO_VALIDATION_H_
absl::Status ValidateTerminationCriteria(const TerminationCriteria &criteria)
absl::Status ValidateMalitskyPockParams(const MalitskyPockParams &params)
absl::Status ValidateAdaptiveLinesearchParams(const AdaptiveLinesearchParams &params)
absl::Status ValidatePrimalDualHybridGradientParams(const PrimalDualHybridGradientParams &params)