Skip to content

Commit b91ca3a

Browse files
committed
Camel case naming in ISAM2DoglegLineSearchParams
1 parent d350b78 commit b91ca3a

File tree

1 file changed

+37
-39
lines changed

1 file changed

+37
-39
lines changed

gtsam/nonlinear/ISAM2Params.h

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -134,64 +134,62 @@ struct GTSAM_EXPORT ISAM2DoglegParams {
134134
* ISAM2(const ISAM2Params&).
135135
*/
136136
struct GTSAM_EXPORT ISAM2DoglegLineSearchParams {
137-
double _min_delta; ///< Minimum allowed small delta
138-
double _max_delta; ///< Maximum allowed delta
139-
double _step_size; ///< Increase of trust region for outward steps
140-
double _sufficient_decrease_coeff; ///< Coefficient for suff. decrease check
141-
double _wildfire_threshold; ///< Update delta when changes are above thresh
142-
bool _verbose; ///< Whether to print debug information
137+
double minDelta; ///< Minimum allowed small delta
138+
double maxDelta; ///< Maximum allowed delta
139+
double stepSize; ///< Increase of trust region for outward steps
140+
double sufficientDecreaseCoeff; ///< Coefficient for suff. decrease check
141+
double wildfireThreshold; ///< Update delta when changes are above thresh
142+
bool verbose; ///< Whether to print debug information
143143

144144
/** Specify parameters as constructor arguments */
145-
ISAM2DoglegLineSearchParams(double min_delta = 0.02, double max_delta = 0.5,
146-
double step_size = 1.5,
147-
double sufficient_decrease_coeff = 1e-3,
148-
double wildfire_threshold = 1e-4,
145+
ISAM2DoglegLineSearchParams(double minDelta = 0.02, double maxDelta = 0.5,
146+
double stepSize = 1.5,
147+
double sufficientDecreaseCoeff = 1e-3,
148+
double wildfireThreshold = 1e-4,
149149
bool verbose = false)
150-
: _min_delta(min_delta),
151-
_max_delta(max_delta),
152-
_step_size(step_size),
153-
_sufficient_decrease_coeff(sufficient_decrease_coeff),
154-
_wildfire_threshold(wildfire_threshold),
155-
_verbose(verbose) {
156-
if (min_delta < 1e-12 || max_delta < 1e-12 || step_size < 1.0) {
150+
: minDelta(minDelta),
151+
maxDelta(maxDelta),
152+
stepSize(stepSize),
153+
sufficientDecreaseCoeff(sufficientDecreaseCoeff),
154+
wildfireThreshold(wildfireThreshold),
155+
verbose(verbose) {
156+
if (minDelta < 1e-12 || maxDelta < 1e-12 || stepSize < 1.0) {
157157
throw std::invalid_argument(
158158
"ISAM2DoglegLineSearchParams constructed with invalid configuration. "
159-
"Search Bounds [min_delta, max_delta] ~ 0 or step_size < 1.0");
159+
"Search Bounds [minDelta, maxDelta] ~ 0 or stepSize < 1.0");
160160
}
161161
}
162162

163163
void print(const std::string str = "") const {
164164
using std::cout;
165165
cout << str << "type: ISAM2DoglegLineSearchParams\n";
166-
cout << str << "min_delta: " << _min_delta << "\n";
167-
cout << str << "max_delta: " << _max_delta << "\n";
168-
cout << str << "step_size: " << _step_size << "\n";
169-
cout << str << "sufficient_decrease_coeff: " << _sufficient_decrease_coeff
166+
cout << str << "minDelta: " << minDelta << "\n";
167+
cout << str << "maxDelta: " << maxDelta << "\n";
168+
cout << str << "stepSize: " << stepSize << "\n";
169+
cout << str << "sufficientDecreaseCoeff: " << sufficientDecreaseCoeff
170170
<< "\n";
171-
cout << str << "wildfire_threshold: " << _wildfire_threshold << "\n";
171+
cout << str << "wildfireThreshold: " << wildfireThreshold << "\n";
172172
cout.flush();
173173
}
174174
/** Getters **/
175-
double getMinDelta() const { return _min_delta; }
176-
double getMaxDelta() const { return _max_delta; }
177-
double getStepSize() const { return _step_size; }
178-
double getSufficientDecreaseCoeff() const {
179-
return _sufficient_decrease_coeff;
180-
}
181-
double getWildfireThreshold() const { return _wildfire_threshold; }
182-
bool isVerbose() const { return _verbose; }
175+
double getMinDelta() const { return minDelta; }
176+
double getMaxDelta() const { return maxDelta; }
177+
double getStepSize() const { return stepSize; }
178+
double getSufficientDecreaseCoeff() const { return sufficientDecreaseCoeff; }
179+
double getWildfireThreshold() const { return wildfireThreshold; }
180+
bool isVerbose() const { return verbose; }
183181

184182
/** Setters */
185-
void setMinDelta(double min_delta) { this->_min_delta = min_delta; }
186-
void setMaxDelta(double max_delta) { this->_max_delta = max_delta; }
187-
void setStepSize(double step_size) { this->_step_size = step_size; }
188-
void setSufficientDecreaseCoeff(double sufficient_decrease_coeff) {
189-
this->_sufficient_decrease_coeff = sufficient_decrease_coeff;
183+
void setMinDelta(double minDelta) { this->minDelta = minDelta; }
184+
void setMaxDelta(double maxDelta) { this->maxDelta = maxDelta; }
185+
void setStepSize(double stepSize) { this->stepSize = stepSize; }
186+
void setSufficientDecreaseCoeff(double sufficientDecreaseCoeff) {
187+
this->sufficientDecreaseCoeff = sufficientDecreaseCoeff;
190188
}
191-
void setWildfireThreshold(double wildfire_threshold) {
192-
this->_wildfire_threshold = wildfire_threshold;
189+
void setWildfireThreshold(double wildfireThreshold) {
190+
this->wildfireThreshold = wildfireThreshold;
193191
}
194-
void setVerbose(bool verbose) { this->_verbose = verbose; }
192+
void setVerbose(bool verbose) { this->verbose = verbose; }
195193
};
196194

197195
/**

0 commit comments

Comments
 (0)