Exception.h File Reference
#include <string>
#include <exception>
+ Include dependency graph for Exception.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  shark::Exception
 Top-level exception class of the shark library. More...
 

Namespaces

namespace  shark
 AbstractSingleObjectiveOptimizer.
 

Macros

#define SHARKEXCEPTION(message)   shark::Exception(message, __FILE__, __LINE__)
 Convenience macro that creates an instance of class shark::exception, injecting file and line information automatically. More...
 
#define RANGE_CHECK(cond)   do { if (!(cond)) throw SHARKEXCEPTION("range check error: "#cond); } while (false)
 
#define SIZE_CHECK(cond)   do { if (!(cond)) throw SHARKEXCEPTION("size mismatch: "#cond); } while (false)
 
#define TYPE_CHECK(cond)   do { if (!(cond)) throw SHARKEXCEPTION("type mismatch: "#cond); } while (false)
 
#define IO_CHECK(cond)   do { if (!(cond)) throw SHARKEXCEPTION("I/O error "); } while (false)
 
#define SHARK_ASSERT(cond)   do { if (!(cond)) throw SHARKEXCEPTION("assertion failed: "#cond); } while (false)
 
#define SHARK_CHECK(cond, error)   do { if (!(cond)) throw SHARKEXCEPTION(error); } while (false)
 

Functions

void THROW_IF (bool unexpectedCondition, const std::string &message)
 

Macro Definition Documentation

#define IO_CHECK (   cond)    do { if (!(cond)) throw SHARKEXCEPTION("I/O error "); } while (false)

Definition at line 112 of file Exception.h.

#define RANGE_CHECK (   cond)    do { if (!(cond)) throw SHARKEXCEPTION("range check error: "#cond); } while (false)
#define SHARK_ASSERT (   cond)    do { if (!(cond)) throw SHARKEXCEPTION("assertion failed: "#cond); } while (false)

Definition at line 113 of file Exception.h.

Referenced by shark::ProductKernel< InputType >::addKernel(), shark::OneVersusOneClassifier< InputType >::binary(), shark::BinaryTree< VectorType >::BinaryTree(), BOOST_FUSION_ADAPT_TPL_STRUCT(), shark::QpMcDecomp< Matrix >::checkKKT(), shark::SvmLogisticInterpretation< InputType >::closestFeasible(), shark::MissingFeaturesKernelExpansion< InputType >::computeNorm(), shark::ContrastiveDivergence< Operator >::ContrastiveDivergence(), shark::dataDimension(), shark::QpMcDecomp< Matrix >::deactivateExample(), shark::DiscreteLoss::defineCostMatrix(), shark::detail::ErrorFunctionWrapper< InputType, LabelType, OutputType >::ErrorFunctionWrapper(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::SpanBoundCSvm< InputType >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::eval(), shark::NBClassifier< InputType, OutputType >::eval(), shark::LooError< ModelTypeT, LabelType >::eval(), shark::KernelExpansion< InputType >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::SpanBoundCSvm< InputType >::evalDerivative(), shark::ExactGradient< RBMType >::ExactGradient(), shark::export_kernel_matrix(), shark::GeneralizationQuotient< PointType >::GeneralizationQuotient(), shark::NBClassifier< InputType, OutputType >::getFeatureDist(), shark::AbstractClustering< RealVector >::hardMembership(), shark::detail::import_csv(), shark::detail::import_csv_regression(), shark::SvmLogisticInterpretation< InputType >::isFeasible(), shark::KernelExpansion< InputType >::KernelExpansion(), shark::MultiChainApproximator< MarkovChainType >::MultiChainApproximator(), shark::detail::NoisyErrorFunctionWrapper< InputType, LabelType, OutputType, RngType >::NoisyErrorFunctionWrapper(), shark::NormalizedKernel< InputType >::NormalizedKernel(), shark::numberOfClasses(), shark::QpBoxLinear::QpBoxLinear(), shark::QpMcLinear::QpMcLinear(), shark::KernelExpansion< InputType >::read(), shark::ScaledKernel< InputType >::ScaledKernel(), shark::QpMcDecomp< Matrix >::selectWorkingSet(), shark::MissingFeaturesKernelExpansion< InputType >::setClassifierNorm(), shark::SigmoidModel::setMinLogValue(), shark::IParameterizable::setParameterVector(), shark::RFClassifier::setParameterVector(), shark::HierarchicalClustering< InputT >::setParameterVector(), shark::PolynomialKernel< InputType >::setParameterVector(), shark::EpsilonSvmTrainer< InputType, CacheType >::setParameterVector(), shark::OneClassSvmTrainer< InputType, CacheType >::setParameterVector(), shark::CARTClassifier< RealVector >::setParameterVector(), shark::NBClassifier< InputType, OutputType >::setParameterVector(), shark::AbstractSvmTrainer< InputType, unsigned int >::setParameterVector(), shark::AbstractLinearSvmTrainer::setParameterVector(), shark::MissingFeaturesKernelExpansion< InputType >::setScalingCoefficients(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::setThresholds(), shark::JaakkolaHeuristic::sigma(), shark::SingleChainApproximator< MarkovChainType >::SingleChainApproximator(), shark::Pegasos< VectorType >::solve(), shark::QpMcLinear::solve(), shark::QpBoxLinear::solve(), shark::McPegasos< VectorType >::solve(), shark::QpMcDecomp< Matrix >::solve(), shark::QpMcDecomp< Matrix >::solveForBias(), shark::detail::SparseFFNetErrorWrapper< HiddenNeuron, OutputNeuron >::SparseFFNetErrorWrapper(), shark::NormalizeKernelUnitVariance< InputType >::train(), shark::QpMcDecomp< Matrix >::unshrink(), shark::WeightedSumKernel< InputType >::WeightedSumKernel(), and shark::KernelExpansion< InputType >::write().

#define SHARK_CHECK (   cond,
  error 
)    do { if (!(cond)) throw SHARKEXCEPTION(error); } while (false)

Definition at line 114 of file Exception.h.

Referenced by shark::CombinedObjectiveFunction< SearchSpaceType, ResultT >::add(), shark::QpSparseArray< QpFloatType >::add(), shark::OneVersusOneClassifier< InputType >::addClass(), shark::AbstractObjectiveFunction< VectorSpace< double >, double >::announceConstraintHandler(), shark::ARDKernelUnconstrained< InputType >::ARDKernelUnconstrained(), shark::AverageEnergyGradient< RBM >::AverageEnergyGradient(), shark::binarySubProblem(), shark::calculateRegularizedKernelMatrix(), shark::ClusteringModel< InputT, unsigned int >::ClusteringModel(), shark::CSvmTrainer< InputType, CacheType >::computeBias(), shark::createLabeledDataFromRange(), shark::LinearModel< InputType, OutputType >::createState(), shark::CSvmDerivative< InputType, CacheType >::CSvmDerivative(), shark::Normalizer< DataType >::diagonal(), shark::DiscreteKernel::DiscreteKernel(), shark::NegativeAUC< LabelType, OutputType >::eval(), shark::ThresholdConverter::eval(), shark::RadiusMarginQuotient< InputType, CacheType >::eval(), shark::SvmLogisticInterpretation< InputType >::eval(), shark::NegativeWilcoxonMannWhitneyStatistic< LabelType, OutputType >::eval(), shark::ArgMaxConverter::eval(), shark::OneHotConverter::eval(), shark::Normalizer< DataType >::eval(), shark::LinearModel< InputType, OutputType >::eval(), shark::CombinedObjectiveFunction< SearchSpaceType, ResultT >::evalDerivative(), shark::RadiusMarginQuotient< InputType, CacheType >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::detail::export_csv(), shark::LinearModel< InputType, OutputType >::hasOffset(), shark::HierarchicalClustering< InputT >::HierarchicalClustering(), shark::LinearModel< InputType, OutputType >::inputSize(), shark::Normalizer< DataType >::inputSize(), shark::KernelTargetAlignment< InputType >::KernelTargetAlignment(), shark::LabeledData< InputType, LabelType >::LabeledData(), shark::LooErrorCSvm< InputType, CacheType >::LooErrorCSvm(), shark::LinearModel< InputType, OutputType >::matrix(), shark::LinearModel< InputType, OutputType >::matrixColumn(), shark::LinearModel< InputType, OutputType >::matrixRow(), shark::LinearModel< InputType, OutputType >::numberOfParameters(), shark::Normalizer< DataType >::numberOfParameters(), shark::KernelExpansion< InputType >::offset(), shark::LinearModel< InputType, OutputType >::offset(), shark::OnlineRNNet::OnlineRNNet(), shark::LinearModel< InputType, OutputType >::outputSize(), shark::Normalizer< DataType >::outputSize(), shark::LinearModel< InputType, OutputType >::parameterVector(), shark::Normalizer< DataType >::parameterVector(), shark::PolynomialKernel< InputType >::PolynomialKernel(), shark::QpMcDecomp< Matrix >::QpMcDecomp(), shark::detail::SharedContainer< LabelT >::repartition(), shark::RNNet::RNNet(), shark::KernelExpansion< InputType >::setAlpha(), shark::TemperedMarkovChain< Operator >::setBatchSize(), shark::PCA::setData(), shark::PolynomialKernel< InputType >::setDegree(), shark::GaussianRbfKernel< InputType >::setGamma(), shark::LBFGS::setHistCount(), shark::KernelExpansion< InputType >::setOffset(), shark::GaussianRbfKernel< InputType >::setParameterVector(), shark::OneVersusOneClassifier< InputType >::setParameterVector(), shark::NearestNeighborClassifier< InputType >::setParameterVector(), shark::SoftNearestNeighborClassifier< InputType >::setParameterVector(), shark::ThresholdConverter::setParameterVector(), shark::NearestNeighborRegression< InputType >::setParameterVector(), shark::ThresholdVectorConverter::setParameterVector(), shark::detail::LinearModelWrapper< Matrix, InputType, OutputType >::setParameterVector(), shark::LinearModel< InputType, OutputType >::setParameterVector(), shark::ArgMaxConverter::setParameterVector(), shark::Normalizer< DataType >::setParameterVector(), shark::OneHotConverter::setParameterVector(), shark::KernelExpansion< InputType >::setParameterVector(), shark::LinearModel< InputType, OutputType >::setStructure(), shark::Normalizer< DataType >::setStructure(), shark::SoftClusteringModel< InputT >::SoftClusteringModel(), shark::QpMcDecomp< Matrix >::solveForBias(), shark::detail::SharedContainer< LabelT >::splice(), shark::detail::SharedContainer< LabelT >::splitBatch(), shark::SvmLogisticInterpretation< InputType >::SvmLogisticInterpretation(), shark::KernelMeanClassifier< InputType >::train(), shark::NormalizeComponentsWhitening< VectorType >::train(), shark::NormalizeKernelUnitVariance< InputType >::train(), shark::NBClassifierTrainer< InputType, OutputType >::train(), shark::NormalizeComponentsUnitInterval< DataType >::train(), shark::NormalizeComponentsUnitVariance< DataType >::train(), shark::RegularizationNetworkTrainer< InputType >::train(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::train(), shark::McSvmOVATrainer< InputType, CacheType >::train(), shark::FisherLDA::train(), shark::McSvmCSTrainer< InputType, CacheType >::train(), shark::McSvmMMRTrainer< InputType, CacheType >::train(), shark::McSvmLLWTrainer< InputType, CacheType >::train(), shark::McSvmADMTrainer< InputType, CacheType >::train(), shark::McSvmWWTrainer< InputType, CacheType >::train(), shark::McSvmATMTrainer< InputType, CacheType >::train(), shark::McSvmATSTrainer< InputType, CacheType >::train(), shark::CSvmTrainer< InputType, CacheType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::OneClassSvmTrainer< InputType, CacheType >::train(), shark::LinearMcSvmOVATrainer::train(), shark::LinearMcSvmMMRTrainer::train(), shark::LinearMcSvmADMTrainer::train(), shark::LinearMcSvmLLWTrainer::train(), shark::LinearMcSvmATMTrainer::train(), shark::LinearMcSvmCSTrainer::train(), shark::LinearMcSvmWWTrainer::train(), shark::LinearCSvmTrainer::train(), shark::LinearMcSvmATSTrainer::train(), shark::Normalizer< DataType >::vector(), shark::detail::LinearModelWrapper< Matrix, InputType, OutputType >::weightedParameterDerivative(), and shark::WeightedSumKernel< InputType >::WeightedSumKernel().

#define SHARKEXCEPTION (   message)    shark::Exception(message, __FILE__, __LINE__)

Convenience macro that creates an instance of class shark::exception, injecting file and line information automatically.

Definition at line 96 of file Exception.h.

Referenced by shark::InferenceMachine::characteristicCurve(), shark::AbstractOptimizer< SearchSpace, double, SingleObjectiveResultSet< SearchSpace::PointType > >::checkFeatures(), shark::choleskyDecomposition(), shark::SvmLogisticInterpretation< InputType >::closestFeasible(), shark::RecurrentStructure::configure(), shark::FFNet< HiddenNeuron, OutputNeuron >::configure(), shark::AbstractModel< InputT, unsigned int >::createState(), shark::AbstractKernelFunction< KernelInputType >::createState(), shark::eigensymm(), shark::eigensymm_intermediate(), shark::eigensymmJacobi(), shark::NegativeAUC< LabelType, OutputType >::eval(), shark::NegativeWilcoxonMannWhitneyStatistic< LabelType, OutputType >::eval(), shark::evalSkipMissingFeatures(), shark::export_kernel_matrix(), shark::export_libsvm(), shark::Logger::fromString(), shark::AbstractObjectiveFunction< VectorSpace< double >, double >::getConstraintHandler(), shark::detail::import_csv(), shark::detail::import_csv_regression(), shark::detail::importPGM(), shark::AbstractSingleObjectiveOptimizer< VectorSpace< double > >::init(), shark::PolynomialMutator::init(), shark::SimulatedBinaryCrossover< RealVector >::init(), shark::detail::RealCodedNSGAII< Indicator >::init(), shark::detail::SMSEMOA::init(), shark::IRpropPlus::init(), shark::TemperedMarkovChain< Operator >::initializeChain(), shark::AbstractObjectiveFunction< VectorSpace< double >, double >::isFeasible(), shark::IterativeNNQuery< DataContainer >::next(), shark::nth(), shark::TwoStateSpace< State1, State2 >::numberOfStates(), shark::FrontStore< ResultType, MetaDataType >::onNewResult(), shark::TournamentSelection::operator()(), shark::elitist_cma::Initializer< Individual, Chromosome, shark::ChromosomeIndex< 0 >::INDEX >::operator()(), shark::LineSearch::operator()(), shark::Weibull< RngType >::p(), shark::CSvmDerivative< InputType, CacheType >::prepareCSvmParameterDerivative(), shark::SvmLogisticInterpretation< InputType >::proposeStartingPoint(), shark::QpMcDecomp< Matrix >::QpMcDecomp(), shark::CSvmDerivative< InputType, CacheType >::read(), shark::LeastContributorApproximator< Rng, ExactHypervolume >::sample(), shark::ScopedHandle< T >::ScopedHandle(), shark::QpMcDecomp< Matrix >::selectWorkingSetSMO(), shark::NBClassifier< InputType, OutputType >::setClassPrior(), shark::AbstractObjectiveFunction< VectorSpace< double >, double >::setNumberOfObjectives(), shark::McPegasos< VectorType >::solve(), shark::QpMcDecomp< Matrix >::solveSMO(), shark::stl_correlation(), shark::stl_mean(), shark::stl_median(), shark::stl_percentile(), shark::stl_variance(), shark::svd(), THROW_IF(), shark::Logger::toString(), shark::CARTTrainer::totalSumOfSquares(), shark::RFTrainer::totalSumOfSquares(), shark::GenericDistTrainer::train(), shark::LDA::train(), shark::AbstractKernelFunction< KernelInputType >::weightedInputDerivative(), shark::WeightedSumKernel< InputType >::weightedInputDerivativeImpl(), shark::AbstractKernelFunction< KernelInputType >::weightedParameterDerivative(), and shark::CSvmDerivative< InputType, CacheType >::write().

#define SIZE_CHECK (   cond)    do { if (!(cond)) throw SHARKEXCEPTION("size mismatch: "#cond); } while (false)

Definition at line 110 of file Exception.h.

Referenced by shark::BoxConstrainedProblem< SVMProblem >::activateVariable(), shark::SvmProblem< Problem >::activateVariable(), shark::AverageEnergyGradient< RBM >::addHV(), shark::AverageEnergyGradient< RBM >::addVH(), shark::applyHouseholderOnTheLeft(), shark::applyHouseholderOnTheRight(), shark::approxSolveSymmSystem(), shark::approxSolveSymmSystemInPlace(), shark::blas::arg_max(), shark::blas::arg_min(), shark::FixedDenseVectorProxy< ValueType >::assign(), shark::FixedDenseMatrixProxy< ValueType, Orientation >::assign(), shark::GridSearch::assignExponentialRange(), shark::GridSearch::assignLinearRange(), shark::detail::SharedContainer< LabelT >::batch(), shark::TemperedMarkovChain< Operator >::beta(), shark::BoxConstrainedProblem< SVMProblem >::boundedAlphaUpdate(), shark::BoxConstraintHandler< SearchPointType >::BoxConstraintHandler(), shark::BoxedSVMProblem< MatrixT >::BoxedSVMProblem(), shark::AbstractSvmTrainer< InputType, unsigned int >::C(), shark::choleskyDecomposition(), shark::LinearClassifier::classMean(), shark::BoxConstraintHandler< SearchPointType >::closestFeasible(), shark::MissingFeaturesKernelExpansion< InputType >::computeNorm(), shark::GridSearch::configure(), shark::NestedGridSearch::configure(), shark::createCVIndexed(), shark::createHouseholderReflection(), shark::GibbsOperator< RBMType >::createSample(), shark::CSVMProblem< MatrixT >::CSVMProblem(), shark::BoxConstrainedProblem< SVMProblem >::deactivateVariable(), shark::SvmProblem< Problem >::deactivateVariable(), shark::decomposedGeneralInverse(), shark::detsymm(), shark::diag(), shark::blas::diagonalMahalanobisDistance(), shark::blas::diagonalMahalanobisDistanceSqr(), shark::blas::diagonalMahalanobisNorm(), shark::blas::diagonalMahalanobisNormSqr(), shark::blas::distance(), shark::blas::distanceSqr(), shark::dlinmin(), shark::eigenerr(), shark::eigensort(), shark::eigensymm(), shark::eigensymm_intermediate(), shark::eigensymmJacobi(), shark::eigensymmJacobi2(), shark::PCA::eigenvalue(), shark::Energy< RBM >::energy(), shark::BinaryLayer::energyTerm(), shark::GaussianLayer::energyTerm(), shark::TruncatedExponentialLayer::energyTerm(), shark::detail::ensureSize(), shark::ExampleModifiedKernelMatrix< InputType, CacheType >::entry(), shark::LinearNorm::eval(), shark::SquaredLoss< VectorType >::eval(), shark::ZeroOneLoss< LabelType, OutputType >::eval(), shark::OnlineRNNet::eval(), shark::Himmelblau::eval(), shark::SigmoidModel::eval(), shark::DiscreteLoss::eval(), shark::AbsoluteLoss< VectorType >::eval(), shark::LinearKernel< InputType >::eval(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::NegativeClassificationLogLikelihood::eval(), shark::Softmax::eval(), shark::ScaledKernel< InputType >::eval(), shark::MonomialKernel< InputType >::eval(), shark::ZeroOneLoss< unsigned int, RealVector >::eval(), shark::TspTourLength::eval(), shark::RadiusMarginQuotient< InputType, CacheType >::eval(), shark::AbstractLoss< InputType, InputType >::eval(), shark::CMACMap::eval(), shark::GaussianRbfKernel< InputType >::eval(), shark::ARDKernelUnconstrained< InputType >::eval(), shark::NBClassifier< InputType, OutputType >::eval(), shark::PolynomialKernel< InputType >::eval(), shark::RBFNet::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::OneNormRegularizer::evalDerivative(), shark::NegativeClassificationLogLikelihood::evalDerivative(), shark::RadiusMarginQuotient< InputType, CacheType >::evalDerivative(), shark::AbstractLoss< InputType, InputType >::evalDerivative(), shark::evalSkipMissingFeatures(), shark::BinaryLayer::expectedParameterDerivative(), shark::GaussianLayer::expectedParameterDerivative(), shark::TruncatedExponentialLayer::expectedParameterDerivative(), shark::GaussianLayer::expectedPhiValue(), shark::TruncatedExponentialLayer::expectedPhiValue(), shark::export_kernel_matrix(), shark::fast_prod(), shark::FixedSparseVectorProxy< T const, std::size_t >::find(), shark::blas::matrix_transpose< E >::find1(), shark::blas::matrix_transpose< E >::find2(), shark::FixedSparseVectorProxy< T const, std::size_t >::find_element(), shark::BoxConstrainedProblem< SVMProblem >::flipCoordinates(), shark::SvmProblem< Problem >::flipCoordinates(), shark::CVFolds< DatasetType >::foldIndices(), shark::detail::bindings::gemm(), shark::detail::bindings::gemv(), shark::detail::generalBlockPanelOperation(), shark::detail::generalMatrixMatrixOperation(), shark::generalMatrixMatrixOperation(), shark::detail::generalMatrixVectorOperation(), shark::detail::generalPanelBlockOperation(), shark::detail::generalPanelPanelOperation(), shark::generalPanelPanelOperation(), shark::GeneralQuadraticProblem< MatrixT >::GeneralQuadraticProblem(), shark::get(), shark::NBClassifier< InputType, OutputType >::getDistSize(), shark::NBClassifier< InputType, OutputType >::getFeatureDist(), shark::identity(), shark::NoisyRprop::init(), shark::GridSearch::init(), shark::NestedGridSearch::init(), shark::blas::inplace_solve(), shark::Energy< RBM >::inputHidden(), shark::Energy< RBM >::inputVisible(), shark::BoxConstraintHandler< SearchPointType >::isFeasible(), shark::kMeans(), shark::LabeledData< InputType, LabelType >::LabeledData(), shark::linmin(), shark::lnsrch(), shark::logdetsymm(), shark::BinaryLayer::logMarginalize(), shark::GaussianLayer::logMarginalize(), shark::TruncatedExponentialLayer::logMarginalize(), shark::Energy< RBM >::logUnnormalizedPropabilityHidden(), shark::Energy< RBM >::logUnnormalizedPropabilityVisible(), shark::mean(), shark::BinaryLayer::mean(), shark::GaussianLayer::mean(), shark::meanvar(), shark::FixedDenseVectorProxy< ValueType >::minus_assign(), shark::FixedDenseMatrixProxy< ValueType, Orientation >::minus_assign(), shark::NBClassifier< InputType, OutputType >::NBClassifier(), shark::GlobalIntermediateRecombination< PointType >::operator()(), shark::blas::vector_inner_prod< T >::operator()(), shark::DataView< shark::LabeledData< InputType, LabelType > const >::operator[](), shark::orthoNormalize(), shark::BinaryLayer::parameterDerivative(), shark::GaussianLayer::parameterDerivative(), shark::TruncatedExponentialLayer::parameterDerivative(), shark::RecurrentStructure::parameterVector(), shark::BinaryLayer::phi(), shark::GaussianLayer::phi(), shark::TruncatedExponentialLayer::phi(), shark::FixedDenseVectorProxy< ValueType >::plus_assign(), shark::FixedDenseMatrixProxy< ValueType, Orientation >::plus_assign(), shark::detail::bindings::potrf(), shark::detail::bindings::potri(), shark::detail::bindings::potrs(), shark::GibbsOperator< RBMType >::precomputeHidden(), shark::GibbsOperator< RBMType >::precomputeVisible(), shark::randomRotationMatrix(), shark::rank(), shark::rankDecomp(), shark::RegularizedKernelMatrix< InputType, CacheType >::RegularizedKernelMatrix(), shark::detail::SharedContainer< LabelT >::repartition(), shark::ROC::ROC(), shark::CachedMatrix< Matrix >::row(), shark::BinaryLayer::sample(), shark::GaussianLayer::sample(), shark::TruncatedExponentialLayer::sample(), shark::TemperedMarkovChain< Operator >::setBeta(), shark::BoxConstraintHandler< SearchPointType >::setBounds(), shark::LinearClassifier::setClassMean(), shark::ARDKernelUnconstrained< InputType >::setGammaVector(), shark::CachedMatrix< Matrix >::setMaxCachedIndex(), shark::SigmoidModel::setParameterVector(), shark::LinearKernel< InputType >::setParameterVector(), shark::Softmax::setParameterVector(), shark::DiscreteKernel::setParameterVector(), shark::LDA::setParameterVector(), shark::LinearRegression::setParameterVector(), shark::MonomialKernel< InputType >::setParameterVector(), shark::RBFNet::setParameterVector(), shark::ARDKernelUnconstrained< InputType >::setParameterVector(), shark::ProductKernel< InputType >::setParameterVector(), shark::CMACMap::setParameterVector(), shark::LassoRegression< InputVectorType >::setParameterVector(), shark::PolynomialKernel< InputType >::setParameterVector(), shark::RecurrentStructure::setParameterVector(), shark::WeightedSumKernel< InputType >::setParameterVector(), shark::Normalizer< DataType >::setParameterVector(), shark::ExampleModifiedKernelMatrix< InputType, CacheType >::setScalingCoefficients(), shark::RecurrentStructure::setStructure(), shark::FFNet< HiddenNeuron, OutputNeuron >::setStructure(), shark::detail::SharedContainer< LabelT >::SharedContainer(), shark::BaseShrinkingProblem< BoxConstrainedProblem< SVMProblem > >::shrinkVariable(), shark::QpMcDecomp< Matrix >::solve(), shark::QpMcDecomp< Matrix >::solveSMO(), shark::solveSymmSystem(), shark::solveSymmSystemInPlace(), shark::solveSystem(), shark::solveTriangularSystemInPlace(), shark::splitAtElement(), shark::detail::SharedContainer< LabelT >::splitBatch(), shark::NestedGridSearch::step(), shark::detail::SubrangeKernelBase< InputType >::SubrangeKernelBase(), shark::BinaryLayer::sufficientStatistics(), shark::TruncatedExponentialLayer::sufficientStatistics(), shark::GaussianLayer::sufficientStatistics(), shark::detail::bindings::syrk(), shark::trace(), shark::NormalTrainer::train(), shark::NBClassifierTrainer< InputType, OutputType >::train(), shark::SigmoidFitPlatt::train(), shark::LassoRegression< InputVectorType >::train(), shark::CVFolds< DatasetType >::training(), shark::detail::bindings::trsm(), shark::detail::bindings::trsv(), shark::BoxConstrainedProblem< SVMProblem >::updateAlphaStatus(), shark::BoxConstrainedProblem< SVMProblem >::updateSMO(), shark::BaseShrinkingProblem< BoxConstrainedProblem< SVMProblem > >::updateSMO(), shark::SvmProblem< Problem >::updateSMO(), shark::CVFolds< DatasetType >::validation(), shark::LinearNorm::weightedInputDerivative(), shark::SigmoidModel::weightedInputDerivative(), shark::Softmax::weightedInputDerivative(), shark::LinearKernel< InputType >::weightedInputDerivative(), shark::ScaledKernel< InputType >::weightedInputDerivative(), shark::MonomialKernel< InputType >::weightedInputDerivative(), shark::GaussianRbfKernel< InputType >::weightedInputDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedInputDerivative(), shark::PolynomialKernel< InputType >::weightedInputDerivative(), shark::WeightedSumKernel< InputType >::weightedInputDerivative(), shark::LinearNorm::weightedParameterDerivative(), shark::SigmoidModel::weightedParameterDerivative(), shark::OnlineRNNet::weightedParameterDerivative(), shark::LinearKernel< InputType >::weightedParameterDerivative(), shark::Softmax::weightedParameterDerivative(), shark::CMACMap::weightedParameterDerivative(), shark::RNNet::weightedParameterDerivative(), shark::MonomialKernel< InputType >::weightedParameterDerivative(), shark::RBFNet::weightedParameterDerivative(), shark::GaussianRbfKernel< InputType >::weightedParameterDerivative(), shark::detail::LinearModelWrapper< Matrix, InputType, OutputType >::weightedParameterDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedParameterDerivative(), shark::PolynomialKernel< InputType >::weightedParameterDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedParameterDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedParameterDerivativeFullDelta(), shark::wolfecubic(), shark::detail::VectorInitializer< VectorExpression, InitExpression >::~VectorInitializer(), and shark::detail::VectorSplitter< VectorExpression, SplittingExpression >::~VectorSplitter().

#define TYPE_CHECK (   cond)    do { if (!(cond)) throw SHARKEXCEPTION("type mismatch: "#cond); } while (false)

Definition at line 111 of file Exception.h.

Function Documentation

void THROW_IF ( bool  unexpectedCondition,
const std::string &  message 
)
inline

Break the execution and throw exception with message in case of predefined unexpectedCondition is true

Note
This should not be replaced by SHARK_CHECK as we need always evaluate unexpectedCondition

Definition at line 100 of file Exception.h.

References SHARKEXCEPTION.

Referenced by shark::detail::constructLabeledData(), shark::detail::loadHDF5Csc(), and shark::detail::loadIntoMatrix().