mlpack
1.0.12
|
Provides a convenient way to give formatted output. More...
Static Public Member Functions | |
static void | Assert (bool condition, const std::string &message="Assert Failed.") |
Checks if the specified condition is true. More... | |
Static Public Attributes | |
static std::ostream & | cout |
Reference to cout, if necessary. More... | |
static util::NullOutStream | Debug |
Dumps debug output into the bit nether regions. More... | |
static util::PrefixedOutStream | Fatal |
Prints fatal messages prefixed with [FATAL], then terminates the program. More... | |
static util::PrefixedOutStream | Info |
Prints informational messages if –verbose is specified, prefixed with [INFO ]. More... | |
static util::PrefixedOutStream | Warn |
Prints warning messages prefixed with [WARN ]. More... | |
Provides a convenient way to give formatted output.
The Log class has four members which can be used in the same way ostreams can be used:
Each of these will prefix a tag to the output (for easy filtering), and the fatal output will terminate the program when a newline is encountered. An example is given below.
Any messages sent to Log::Debug will not be shown when compiling in non-debug mode. Messages to Log::Info will only be shown when the –verbose flag is given to the program (or rather, the CLI class).
|
static |
Checks if the specified condition is true.
If not, halts program execution and prints a custom error message. Does nothing in non-debug mode.
Referenced by mlpack::emst::EdgePair::EdgePair().
|
static |
|
static |
Dumps debug output into the bit nether regions.
Definition at line 76 of file log.hpp.
Referenced by mlpack::gmm::PositiveDefiniteConstraint::ApplyConstraint(), mlpack::gmm::GMM< FittingType >::GMM(), and mlpack::distribution::DiscreteDistribution::Probability().
|
static |
Prints fatal messages prefixed with [FATAL], then terminates the program.
Definition at line 87 of file log.hpp.
Referenced by mlpack::kernel::SphericalKernel::ConvolutionIntegral(), and mlpack::gmm::EigenvalueRatioConstraint::EigenvalueRatioConstraint().
|
static |
|
static |
Prints warning messages prefixed with [WARN ].
Definition at line 84 of file log.hpp.
Referenced by mlpack::gmm::EigenvalueRatioConstraint::EigenvalueRatioConstraint(), mlpack::amf::RandomAcolInitialization< p >::Initialize(), and mlpack::cf::CF< FactorizerType >::NumUsersForSimilarity().