86 : output_level(output_level)
99 current_level = level;
123 void output(
const T& t)
125 if (current_level != OutputLevel::Nothing &&
126 static_cast<unsigned>(current_level) <= static_cast<unsigned>(output_level)) {
143 template<
typename OutputFunction>
145 OutputFunction& output_function,
147 decltype(output_function.output_level)* =
nullptr)
151 if (std::is_same<OutputFunction, NoOutput>::value) {
155 return curr_level != OutputLevel::Nothing
156 &&
static_cast<unsigned>(curr_level) <= static_cast<unsigned>(level);
OutputLevel output_level
The current output level.
Definition: OutputUtils.hpp:119
std::ostream & operator<<(std::ostream &os, const Status &status)
Output of Status on std::ostream.
Definition: OptimizationStatus.hpp:47
OutputLevel
The output level for filtering.
Definition: OutputUtils.hpp:11
OstreamOutput & operator<<(const OutputLevel &level)
Set and output the level.
Definition: OutputUtils.hpp:97
OstreamOutput & operator<<(const T &t)
Output variable to the output stream.
Definition: OutputUtils.hpp:112
Class for the output to an std::ostream.
Definition: OutputUtils.hpp:79
BFGS optimizations.
Definition: BFGS.hpp:24
NoOutput struct.
Definition: OutputUtils.hpp:53
bool is_output_enabled(OutputFunction &output_function, OutputLevel curr_level, decltype(output_function.output_level) *=nullptr)
Definition: OutputUtils.hpp:144
OstreamOutput(OutputLevel output_level, std::ostream &os)
Construct OstreamOutput.
Definition: OutputUtils.hpp:85
NoOutput & operator<<(const T &t)
Output operator.
Definition: OutputUtils.hpp:64