Skip to content

Commit 243442c

Browse files
committed
CR: make indent.
1 parent 9eda3de commit 243442c

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

FnCAS/fncas/optimize.h

+9-15
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,27 @@ CURRENT_STRUCT_T(ObjectiveFunctionValue) {
5858
return *this;
5959
}
6060
};
61+
// clang-format on
6162

62-
template<typename T>
63+
template <typename T>
6364
struct ObjectiveFunctionValueExtractorImpl {
6465
using value_t = typename T::value_t;
65-
static value_t Extract(const T& x) {
66-
return x.value;
67-
}
66+
static value_t Extract(const T& x) { return x.value; }
6867
};
6968

70-
template<>
69+
template <>
7170
struct ObjectiveFunctionValueExtractorImpl<fncas::double_t> {
7271
using value_t = fncas::double_t;
73-
static value_t Extract(fncas::double_t x) {
74-
return x;
75-
}
72+
static value_t Extract(fncas::double_t x) { return x; }
7673
};
7774

78-
template<>
75+
template <>
7976
struct ObjectiveFunctionValueExtractorImpl<fncas::term_t> {
8077
using value_t = fncas::term_t;
81-
static value_t Extract(fncas::term_t x) {
82-
return x;
83-
}
78+
static value_t Extract(fncas::term_t x) { return x; }
8479
};
8580

86-
template<typename T>
81+
template <typename T>
8782
typename ObjectiveFunctionValueExtractorImpl<T>::value_t ExtractValueFromObjectiveFunctionValue(const T& x) {
8883
return ObjectiveFunctionValueExtractorImpl<T>::Extract(x);
8984
}
@@ -104,7 +99,7 @@ CURRENT_STRUCT(OptimizationProgress) {
10499
objective_function_values.push_back(value);
105100

106101
// If the user code returns a double, it should always do so.
107-
CURRENT_ASSERT(additional_values.empty());
102+
CURRENT_ASSERT(additional_values.empty());
108103
}
109104

110105
void TrackIteration(const ObjectiveFunctionValue<double>& value) {
@@ -132,7 +127,6 @@ CURRENT_STRUCT(OptimizationResult, ValueAndPoint) {
132127
CURRENT_FIELD(progress, Optional<OptimizationProgress>);
133128
CURRENT_CONSTRUCTOR(OptimizationResult)(const ValueAndPoint& p) : SUPER(p) {}
134129
};
135-
// clang-format on
136130

137131
enum class EarlyStoppingCriterion : bool { StopOptimization = false, ContinueOptimization = true };
138132

0 commit comments

Comments
 (0)