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 MLPACK_EXPORT util::NullOutStream | Debug |
MLPACK_EXPORT is required for global variables, so that they are properly exported by the Windows compiler. More... | |
static MLPACK_EXPORT util::PrefixedOutStream | Fatal |
Prints fatal messages prefixed with [FATAL], then terminates the program. More... | |
static MLPACK_EXPORT util::PrefixedOutStream | Info |
Prints informational messages if –verbose is specified, prefixed with [INFO ]. More... | |
static MLPACK_EXPORT 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 IO 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 EdgePair::EdgePair(), and mlpack::tree::split::PerformSplit().
|
static |
MLPACK_EXPORT is required for global variables, so that they are properly exported by the Windows compiler.
Dumps debug output into the bit nether regions.
Definition at line 79 of file log.hpp.
Referenced by DiagonalGMM::DiagonalGMM(), GMM::GMM(), and mlpack::bindings::cli::ParseCommandLine().
|
static |
Prints fatal messages prefixed with [FATAL], then terminates the program.
Definition at line 90 of file log.hpp.
Referenced by PositiveDefiniteConstraint::ApplyConstraint(), EigenvalueRatioConstraint::ApplyConstraint(), NaiveKernelRule< KernelType >::ApplyKernelMatrix(), NystroemKernelRule< KernelType, PointSelectionPolicy >::ApplyKernelMatrix(), SphericalKernel::ConvolutionIntegral(), mlpack::util::DisableBacktrace(), EigenvalueRatioConstraint::EigenvalueRatioConstraint(), mlpack::util::GetParamWithInfo(), AverageInterpolation::GetWeights(), SimilarityInterpolation::GetWeights(), RegressionInterpolation::GetWeights(), MeanImputation< T >::Impute(), ConstInitialization::Initialize(), GaussianInitialization::Initialize(), RandomInitialization::Initialize(), HeInitialization::Initialize(), GivenInitialization::Initialize(), LecunNormalInitialization::Initialize(), OrthogonalInitialization::Initialize(), GlorotInitializationType< Uniform >::Initialize(), NguyenWidrowInitialization::Initialize(), KathirvalavakumarSubavathiInitialization::Initialize(), OivsInitialization< ActivationFunction >::Initialize(), GivenInitialization::InitializeOne(), PoissonNLLLoss< InputDataType, OutputDataType >::Mean(), ZScoreNormalization::Normalize(), mlpack::bindings::cli::ParseCommandLine(), DiscreteDistribution::Probability(), TfIdfEncodingPolicy::serialize(), AdaptiveMaxPooling< InputDataType, OutputDataType >::WeightSize(), and AdaptiveMeanPooling< InputDataType, OutputDataType >::WeightSize().
|
static |
Prints informational messages if –verbose is specified, prefixed with [INFO ].
Definition at line 84 of file log.hpp.
Referenced by mlpack::util::DisableVerbose(), mlpack::util::EnableVerbose(), mlpack::bindings::cli::EndProgram(), mlpack::util::GetParamWithInfo(), SimpleResidueTermination::IsConverged(), SimpleToleranceTermination< MatType >::IsConverged(), ContinuousMountainCar::IsTerminal(), MountainCar::IsTerminal(), CartPole::IsTerminal(), Acrobot::IsTerminal(), Pendulum::IsTerminal(), ContinuousDoublePoleCart::IsTerminal(), DoublePoleCart::IsTerminal(), and mlpack::bindings::cli::ParseCommandLine().
|
static |
Prints warning messages prefixed with [WARN ].
Definition at line 87 of file log.hpp.
Referenced by EigenvalueRatioConstraint::EigenvalueRatioConstraint(), RandomAcolInitialization< columnsToAverage >::Initialize(), MaxIterationTermination::MaxIterationTermination(), and CFType< DecompositionPolicy, NormalizationPolicy >::NumUsersForSimilarity().