Exception.h File Reference
#include <string>
#include <exception>

Go to the source code of this file.

Classes

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

Namespaces

 shark
 AbstractMultiObjectiveOptimizer.
 

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

§ IO_CHECK

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

Definition at line 110 of file Exception.h.

§ RANGE_CHECK

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

Definition at line 107 of file Exception.h.

Referenced by shark::AbstractLinearSvmTrainer< InputType >::AbstractLinearSvmTrainer(), shark::AbstractSvmTrainer< InputType, RealVector, KernelExpansion< InputType > >::AbstractSvmTrainer(), shark::blas::kernels::assign(), shark::GridSearch::assignExponentialRange(), shark::GridSearch::assignLinearRange(), shark::blas::matrix_column< M >::clear(), shark::blas::compressed_matrix< T, I >::clear_element(), shark::blas::vector< std::size_t >::clear_range(), shark::blas::compressed_matrix< T, I >::clear_range(), shark::blas::dense_vector_adaptor< T >::clear_range(), shark::blas::vector_repeater< V >::column_begin(), shark::blas::vector_repeater< V >::column_end(), shark::blas::columns(), shark::GridSearch::configure(), shark::PointSearch::configure(), shark::CrossEntropy::eval(), shark::ZeroOneLoss< unsigned int, RealVector >::eval(), shark::CrossEntropy::evalDerivative(), shark::LassoRegression< InputVectorType >::LassoRegression(), shark::blas::diagonal_matrix< VectorType >::const_row_iterator::operator==(), shark::blas::matrix_row< Matrix >::reserve(), shark::blas::compressed_matrix< T, I >::reserve_row(), shark::blas::vector_repeater< V >::row_begin(), shark::blas::compressed_matrix< T, I >::row_begin(), shark::blas::compressed_matrix< T, I >::row_capacity(), shark::blas::vector_repeater< V >::row_end(), shark::blas::compressed_matrix< T, I >::row_end(), shark::blas::rows(), shark::ScaledKernel< InputType >::ScaledKernel(), shark::blas::compressed_vector< T, I >::set_element(), shark::blas::matrix< double, blas::column_major >::set_element(), shark::blas::diagonal_matrix< scalar_vector< T > >::set_element(), shark::blas::compressed_matrix< T, I >::set_element(), shark::blas::dense_matrix_adaptor< T, Orientation >::set_element(), shark::LassoRegression< InputVectorType >::setAccuracy(), shark::KernelSGDTrainer< InputType, CacheType >::setC(), shark::AbstractLinearSvmTrainer< InputType >::setC(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::setC(), shark::PolynomialKernel< InputType >::setDegree(), shark::RpropMinus::setEtaMinus(), shark::RpropMinus::setEtaPlus(), shark::ScaledKernel< InputType >::setFactor(), shark::ARDKernelUnconstrained< InputType >::setGammaVector(), shark::LassoRegression< InputVectorType >::setLambda(), shark::CircleInSquare::setLimits(), shark::RpropMinus::setMaxDelta(), shark::RpropMinus::setMinDelta(), shark::PolynomialKernel< InputType >::setParameterVector(), shark::LassoRegression< InputVectorType >::setParameterVector(), shark::LinearRegression::setRegularization(), shark::LDA::setRegularization(), shark::blas::subrange(), shark::blas::vector_range< V >::vector_range(), and shark::WeightedSumKernel< InputType >::weight().

§ SHARK_ASSERT

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

Definition at line 111 of file Exception.h.

Referenced by shark::ProductKernel< InputType >::addKernel(), shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::OneVersusOneClassifier< InputType >::binary(), shark::BinaryTree< VectorType >::BinaryTree(), shark::QpMcDecomp< Matrix >::checkKKT(), shark::MissingFeaturesKernelExpansion< InputType >::computeNorm(), shark::ContrastiveDivergence< Operator >::ContrastiveDivergence(), shark::CARTClassifier< RealVector >::countAttributes(), shark::dataDimension(), shark::QpMcBoxDecomp< Matrix >::deactivateExample(), shark::QpMcSimplexDecomp< Matrix >::deactivateExample(), shark::QpMcDecomp< Matrix >::deactivateExample(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::eval(), shark::LooError< ModelTypeT, LabelType >::eval(), shark::NBClassifier< InputType, OutputType >::eval(), shark::KernelExpansion< RealVector >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::ExactGradient< RBMType >::ExactGradient(), shark::exportKernelMatrix(), shark::AbstractBudgetMaintenanceStrategy< RealVector >::findSmallestVector(), shark::GeneralizationQuotient< PointType >::GeneralizationQuotient(), shark::getColumn(), shark::NBClassifier< InputType, OutputType >::getFeatureDist(), shark::QpMcSimplexDecomp< Matrix >::getSimplexMVP(), shark::AbstractClustering< RealVector >::hardMembership(), shark::SvmLogisticInterpretation< InputType >::isFeasible(), shark::KernelExpansion< RealVector >::KernelExpansion(), shark::QpMcSimplexDecomp< Matrix >::maxGainBox(), shark::MultiChainApproximator< MarkovChainType >::MultiChainApproximator(), shark::NormalizedKernel< InputType >::NormalizedKernel(), shark::QpBoxLinear< InputT >::QpBoxLinear(), shark::QpBoxLinear< CompressedRealVector >::QpBoxLinear(), shark::QpMcLinear< InputT >::QpMcLinear(), shark::KernelExpansion< RealVector >::read(), shark::ScaledKernel< InputType >::ScaledKernel(), shark::QpMcBoxDecomp< Matrix >::selectWorkingSet(), shark::QpMcDecomp< Matrix >::selectWorkingSet(), shark::MissingFeaturesKernelExpansion< InputType >::setClassifierNorm(), shark::setColumn(), GaussianTaskKernel< InputTypeT >::setGamma(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), shark::IParameterizable::setParameterVector(), shark::MeanModel< CARTClassifier< RealVector > >::setParameterVector(), shark::HierarchicalClustering< InputT >::setParameterVector(), shark::RFTrainer::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::KernelSGDTrainer< InputType, CacheType >::setParameterVector(), shark::AbstractSvmTrainer< InputType, RealVector, KernelExpansion< InputType > >::setParameterVector(), shark::AbstractLinearSvmTrainer< InputType >::setParameterVector(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::setParameterVector(), shark::MissingFeaturesKernelExpansion< InputType >::setScalingCoefficients(), shark::KernelExpansion< RealVector >::setStructure(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::setThresholds(), GaussianTaskKernel< InputTypeT >::setWidth(), shark::JaakkolaHeuristic::sigma(), shark::SingleChainApproximator< MarkovChainType >::SingleChainApproximator(), shark::Pegasos< VectorType >::solve(), shark::QpBoxLinear< InputT >::solve(), shark::QpMcLinear< InputT >::solve(), shark::McPegasos< VectorType >::solve(), shark::QpMcDecomp< Matrix >::solve(), shark::QpBoxLinear< CompressedRealVector >::solve(), shark::QpMcDecomp< Matrix >::solveForBias(), shark::NormalizeKernelUnitVariance< InputType >::train(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::train(), shark::QpMcBoxDecomp< Matrix >::unshrink(), shark::QpMcSimplexDecomp< Matrix >::unshrink(), shark::QpMcDecomp< Matrix >::unshrink(), shark::QpMcSimplexDecomp< Matrix >::updateSMO(), shark::QpMcBoxDecomp< Matrix >::updateSMO(), shark::WeightedSumKernel< InputType >::WeightedSumKernel(), and shark::KernelExpansion< RealVector >::write().

§ SHARK_CHECK

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

Definition at line 112 of file Exception.h.

Referenced by shark::CombinedObjectiveFunction< SearchSpaceType, ResultT >::add(), shark::QpSparseArray< QpFloatType >::add(), shark::OneVersusOneClassifier< InputType >::addClass(), shark::MeanModel< CARTClassifier< RealVector > >::addModel(), shark::AbstractObjectiveFunction< SearchSpaceType, ResultT >::announceConstraintHandler(), shark::ARDKernelUnconstrained< InputType >::ARDKernelUnconstrained(), shark::binarySubProblem(), shark::calculateRegularizedKernelMatrix(), shark::ClusteringModel< InputT, unsigned int >::ClusteringModel(), shark::createLabeledDataFromRange(), shark::createUnlabeledDataFromRange(), shark::CSvmDerivative< InputType, CacheType >::CSvmDerivative(), shark::Normalizer< DataType >::diagonal(), shark::DiscreteKernel::DiscreteKernel(), shark::NegativeAUC< LabelType, OutputType >::eval(), shark::RadiusMarginQuotient< InputType, CacheType >::eval(), shark::SvmLogisticInterpretation< InputType >::eval(), shark::NegativeWilcoxonMannWhitneyStatistic< LabelType, OutputType >::eval(), shark::Normalizer< DataType >::eval(), shark::RadiusMarginQuotient< InputType, CacheType >::evalDerivative(), shark::CombinedObjectiveFunction< SearchSpaceType, ResultT >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::NBClassifierTrainer< InputType, OutputType >::getDistTrainerContainer(), shark::HierarchicalClustering< InputT >::HierarchicalClustering(), shark::Normalizer< DataType >::inputSize(), shark::KernelTargetAlignment< InputType, LabelType >::KernelTargetAlignment(), shark::LabeledData< InputType, LabelType >::LabeledData(), shark::LooErrorCSvm< InputType, CacheType >::LooErrorCSvm(), shark::NormalizeComponentsWhitening::NormalizeComponentsWhitening(), shark::NormalizeComponentsZCA::NormalizeComponentsZCA(), shark::Normalizer< DataType >::numberOfParameters(), shark::KernelExpansion< RealVector >::offset(), shark::Normalizer< DataType >::offset(), shark::TournamentSelection< Predicate >::operator()(), shark::Normalizer< DataType >::outputSize(), shark::Normalizer< DataType >::parameterVector(), shark::PolynomialKernel< InputType >::PolynomialKernel(), shark::QpMcBoxDecomp< Matrix >::QpMcBoxDecomp(), shark::QpMcDecomp< Matrix >::QpMcDecomp(), shark::QpMcSimplexDecomp< Matrix >::QpMcSimplexDecomp(), shark::RNNet::RNNet(), shark::GibbsOperator< RBMType >::setAlpha(), shark::EnergyStoringTemperedMarkovChain< Operator >::setBatchSize(), shark::TemperedMarkovChain< Operator >::setBatchSize(), shark::PolynomialKernel< InputType >::setDegree(), shark::GaussianRbfKernel< InputType >::setGamma(), shark::LBFGS::setHistCount(), shark::UniformCrossover::setMixingRatio(), shark::GaussianRbfKernel< InputType >::setParameterVector(), shark::OneVersusOneClassifier< InputType >::setParameterVector(), shark::NearestNeighborRegression< InputType >::setParameterVector(), shark::NearestNeighborClassifier< InputType >::setParameterVector(), shark::SoftNearestNeighborClassifier< InputType >::setParameterVector(), shark::Normalizer< DataType >::setParameterVector(), shark::KernelExpansion< RealVector >::setParameterVector(), shark::Normalizer< DataType >::setStructure(), shark::SoftClusteringModel< InputT >::SoftClusteringModel(), shark::QpMcDecomp< Matrix >::solveForBias(), shark::SvmLogisticInterpretation< InputType >::SvmLogisticInterpretation(), shark::KernelMeanClassifier< InputType >::train(), shark::NormalizeComponentsWhitening::train(), shark::NormalizeComponentsZCA::train(), shark::NBClassifierTrainer< InputType, OutputType >::train(), shark::NormalizeKernelUnitVariance< InputType >::train(), shark::NormalizeComponentsUnitInterval< DataType >::train(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::train(), shark::NormalizeComponentsUnitVariance< DataType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::OneClassSvmTrainer< InputType, CacheType >::train(), shark::CSvmTrainer< InputType, CacheType >::train(), and shark::WeightedSumKernel< InputType >::WeightedSumKernel().

§ SHARKEXCEPTION

#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 94 of file Exception.h.

Referenced by shark::RemoveBudgetMaintenanceStrategy< InputType >::addToModel(), shark::MergeBudgetMaintenanceStrategy< InputType >::addToModel(), shark::AbstractOptimizer< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >::checkFeatures(), shark::blas::choleskyDecomposition(), shark::blas::choleskyUpdate(), shark::AbstractKernelFunction< InputType >::createState(), shark::AbstractModel< InputT, unsigned int >::createState(), shark::NegativeAUC< LabelType, OutputType >::eval(), shark::SquaredLoss< Sequence, Sequence >::eval(), shark::NegativeWilcoxonMannWhitneyStatistic< LabelType, OutputType >::eval(), shark::SquaredLoss< Sequence, Sequence >::evalDerivative(), shark::evalSkipMissingFeatures(), shark::exportKernelMatrix(), shark::exportSparseData(), shark::AbstractObjectiveFunction< SearchSpaceType, ResultT >::getConstraintHandler(), shark::AbstractSingleObjectiveOptimizer< RealVector >::init(), shark::AbstractMultiObjectiveOptimizer< RealVector >::init(), shark::IndicatorBasedSteadyStateMOCMA< Indicator >::init(), shark::IndicatorBasedMOCMA< Indicator >::init(), shark::SMSEMOA::init(), shark::IndicatorBasedRealCodedNSGAII< Indicator >::init(), shark::TemperedMarkovChain< Operator >::initializeChain(), shark::AbstractObjectiveFunction< SearchSpaceType, ResultT >::isFeasible(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::KernelBudgetedSGDTrainer(), shark::IterativeNNQuery< DataContainer >::next(), shark::LabelOrder::normalizeLabels(), shark::TwoStateSpace< State1, State2 >::numberOfStates(), shark::EvaluationArchive< PointType, ResultT >::numberOfVariables(), shark::ElitistSelection< Extractor >::operator()(), shark::EPTournamentSelection< Extractor >::operator()(), shark::Weibull< RngType >::p(), shark::PartlyPrecomputedMatrix< Matrix >::PartlyPrecomputedMatrix(), shark::QpMcDecomp< Matrix >::QpMcDecomp(), shark::CSvmDerivative< InputType, CacheType >::read(), shark::LabelOrder::restoreOriginalLabels(), shark::LeastContributorApproximator< Rng, ExactHypervolume >::sample(), shark::ScopedHandle< T >::ScopedHandle(), shark::QpMcDecomp< Matrix >::selectWorkingSetSMO(), shark::NBClassifier< InputType, OutputType >::setClassPrior(), shark::RFClassifier::setForestInfo(), shark::AbstractObjectiveFunction< SearchSpaceType, ResultT >::setNumberOfObjectives(), shark::AbstractObjectiveFunction< SearchSpaceType, ResultT >::setNumberOfVariables(), shark::McPegasos< VectorType >::solve(), shark::QpMcDecomp< Matrix >::solveSMO(), shark::tetragamma(), THROW_IF(), shark::GenericDistTrainer::train(), shark::AbstractKernelFunction< InputType >::weightedInputDerivative(), shark::WeightedSumKernel< InputType >::weightedInputDerivativeImpl(), shark::AbstractKernelFunction< InputType >::weightedParameterDerivative(), and shark::CSvmDerivative< InputType, CacheType >::write().

§ SIZE_CHECK

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

Definition at line 108 of file Exception.h.

Referenced by shark::BoxConstrainedProblem< Problem >::activateVariable(), shark::SvmProblem< Problem >::activateVariable(), shark::QpMcSimplexDecomp< Matrix >::addDeltaLinear(), shark::QpMcBoxDecomp< Matrix >::addDeltaLinear(), shark::blas::applyHouseholderOnTheLeft(), shark::blas::applyHouseholderOnTheRight(), shark::SvmProblem< Problem >::applyStep(), shark::SvmShrinkingProblem< Problem >::applyStep(), shark::blas::approxsolveSymmPosDefSystem(), shark::blas::approxsolveSymmPosDefSystemInPlace(), shark::blas::arg_max(), shark::blas::arg_min(), shark::blas::assign(), shark::blas::matrix_set< RealMatrix >::assign(), shark::blas::kernels::assign(), shark::GridSearch::assignExponentialRange(), shark::GridSearch::assignLinearRange(), shark::blas::axpy_prod(), shark::GruauPole::balanceFit(), shark::TemperedMarkovChain< Operator >::beta(), shark::BoxConstraintHandler< SearchPointType >::BoxConstraintHandler(), shark::BoxedSVMProblem< MatrixT >::BoxedSVMProblem(), shark::AbstractSvmTrainer< InputType, RealVector, KernelExpansion< InputType > >::C(), shark::calculateMixedKernelMatrix(), shark::calculateRegularizedKernelMatrix(), shark::blas::choleskyDecomposition(), shark::LRUCache< QpFloatType >::clear(), shark::blas::vector< std::size_t >::clear_element(), shark::blas::dense_vector_adaptor< T >::clear_element(), shark::BoxConstraintHandler< SearchPointType >::closestFeasible(), shark::blas::columns(), shark::compare_fitness(), shark::MissingFeaturesKernelExpansion< InputType >::computeNorm(), shark::GridSearch::configure(), shark::NestedGridSearch::configure(), shark::createCVFullyIndexed(), shark::createCVIndexed(), shark::blas::createHouseholderReflection(), shark::GibbsOperator< RBMType >::createSample(), shark::CSVMProblem< MatrixT >::CSVMProblem(), shark::BoxConstrainedProblem< Problem >::deactivateVariable(), shark::SvmProblem< Problem >::deactivateVariable(), shark::BoxConstrainedShrinkingProblem< Problem >::deactivateVariable(), shark::blas::diag(), shark::blas::diagonalMahalanobisDistance(), shark::blas::diagonalMahalanobisDistanceSqr(), shark::blas::diagonalMahalanobisNorm(), shark::blas::diagonalMahalanobisNormSqr(), shark::blas::distance(), shark::blas::distanceSqr(), shark::blas::divide_assign(), shark::blas::matrix_set< RealMatrix >::divide_assign(), shark::IndicatorBasedSteadyStateMOCMA< Indicator >::doInit(), shark::SMSEMOA::doInit(), shark::IndicatorBasedMOCMA< Indicator >::doInit(), shark::IndicatorBasedRealCodedNSGAII< Indicator >::doInit(), shark::blas::kernels::dot(), shark::blas::eigensymm(), shark::PCA::eigenvalue(), shark::Energy< RBM >::energy(), shark::GaussianLayer::energyTerm(), shark::TruncatedExponentialLayer::energyTerm(), shark::BipolarLayer::energyTerm(), shark::BinaryLayer::energyTerm(), shark::ExampleModifiedKernelMatrix< InputType, CacheType >::entry(), shark::HuberLoss::eval(), shark::TukeyBiweightLoss::eval(), shark::EpsilonHingeLoss::eval(), shark::SquaredEpsilonHingeLoss::eval(), shark::SquaredLoss< OutputType, LabelType >::eval(), shark::ZeroOneLoss< LabelType, OutputType >::eval(), shark::AbsoluteLoss< VectorType >::eval(), shark::HingeLoss::eval(), shark::SquaredHingeLoss::eval(), shark::LinearKernel< InputType >::eval(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::Himmelblau::eval(), shark::NegativeLogLikelihood::eval(), shark::RadiusMarginQuotient< InputType, CacheType >::eval(), shark::MonomialKernel< InputType >::eval(), shark::ImpulseNoiseModel::eval(), shark::ScaledKernel< InputType >::eval(), shark::SquaredLoss< OutputType, unsigned int >::eval(), shark::ZeroOneLoss< unsigned int, RealVector >::eval(), shark::GaussianNoiseModel::eval(), shark::ARDKernelUnconstrained< InputType >::eval(), shark::NBClassifier< InputType, OutputType >::eval(), shark::NonMarkovPole::eval(), shark::MarkovPole< HiddenNeuron, OutputNeuron >::eval(), shark::GaussianRbfKernel< InputType >::eval(), shark::GruauPole::eval(), shark::PolynomialKernel< InputType >::eval(), shark::AbstractLoss< unsigned int, RealVector >::eval(), shark::SquaredLoss< Sequence, Sequence >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::EpsilonHingeLoss::evalDerivative(), shark::SquaredEpsilonHingeLoss::evalDerivative(), shark::HuberLoss::evalDerivative(), shark::TukeyBiweightLoss::evalDerivative(), shark::OneNormRegularizer::evalDerivative(), shark::NegativeLogLikelihood::evalDerivative(), shark::HingeLoss::evalDerivative(), shark::SquaredHingeLoss::evalDerivative(), shark::RadiusMarginQuotient< InputType, CacheType >::evalDerivative(), shark::SquaredLoss< OutputType, unsigned int >::evalDerivative(), shark::SquaredLoss< Sequence, Sequence >::evalDerivative(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::evalSkipMissingFeatures(), shark::GaussianLayer::expectedParameterDerivative(), shark::BipolarLayer::expectedParameterDerivative(), shark::TruncatedExponentialLayer::expectedParameterDerivative(), shark::BinaryLayer::expectedParameterDerivative(), shark::GaussianLayer::expectedPhiValue(), shark::TruncatedExponentialLayer::expectedPhiValue(), shark::exportFiltersToPGMGrid(), shark::exportKernelMatrix(), shark::BoxConstrainedProblem< Problem >::flipCoordinates(), shark::SvmProblem< Problem >::flipCoordinates(), shark::blas::kernels::gemm(), shark::blas::kernels::gemv(), shark::GruauPole::generalFit(), shark::GeneralQuadraticProblem< MatrixT >::GeneralQuadraticProblem(), shark::get(), shark::NBClassifier< InputType, OutputType >::getDistSize(), shark::NBClassifier< InputType, OutputType >::getFeatureDist(), shark::GruauPole::gruauFit(), shark::PolynomialMutator::init(), shark::SimulatedBinaryCrossover< RealVector >::init(), shark::GridSearch::init(), shark::NestedGridSearch::init(), shark::RBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), shark::RBM< VisibleLayerT, HiddenLayerT, RngT >::inputVisible(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputVisible(), shark::BoxConstraintHandler< SearchPointType >::isFeasible(), shark::LabeledData< InputType, LabelType >::LabeledData(), shark::GaussianLayer::logMarginalize(), shark::TruncatedExponentialLayer::logMarginalize(), shark::BipolarLayer::logMarginalize(), shark::BinaryLayer::logMarginalize(), shark::GaussianLayer::logProbability(), shark::BipolarLayer::logProbability(), shark::BinaryLayer::logProbability(), shark::Energy< RBM >::logUnnormalizedProbabilityHidden(), shark::Energy< RBM >::logUnnormalizedProbabilityVisible(), shark::blas::lu_factorize(), shark::blas::matrix_column< M >::matrix_column(), shark::blas::matrix_range< Matrix >::matrix_range(), shark::blas::matrix_row< Matrix >::matrix_row(), shark::blas::matrix_vector_range< M >::matrix_vector_range(), shark::GaussianLayer::mean(), shark::BipolarLayer::mean(), shark::BinaryLayer::mean(), shark::blas::minus_assign(), shark::blas::matrix_set< RealMatrix >::minus_assign(), shark::blas::multiply_assign(), shark::blas::matrix_set< RealMatrix >::multiply_assign(), shark::NBClassifier< InputType, OutputType >::NBClassifier(), shark::NormalDistributedPoints::NormalDistributedPoints(), shark::OnePointCrossover::operator()(), shark::InvertedGenerationalDistance::operator()(), shark::MultiplicativeEpsilonIndicator::operator()(), shark::ParetoDominanceComparator< Extractor >::operator()(), shark::AdditiveEpsilonIndicator::operator()(), shark::ElitistSelection< Extractor >::operator()(), shark::EPTournamentSelection< Extractor >::operator()(), shark::blas::compressed_vector< T, I >::operator()(), shark::blas::compressed_matrix< T, I >::operator()(), shark::blas::vector_addition< E1, E2 >::operator()(), shark::blas::vector_binary< E1, E2, F >::operator()(), shark::blas::sparse_vector_adaptor< T, I >::operator()(), shark::Multiply::operator()(), shark::Divide::operator()(), shark::Shift::operator()(), shark::Truncate::operator()(), shark::TruncateAndRescale::operator()(), shark::blas::matrix_set< RealMatrix >::operator*=(), shark::blas::operator*=(), shark::blas::matrix_set< RealMatrix >::operator+=(), shark::blas::operator+=(), shark::blas::matrix_set< RealMatrix >::operator-=(), shark::blas::operator-=(), shark::blas::matrix_set< RealMatrix >::operator/=(), shark::blas::operator/=(), shark::blas::triangular_matrix< T, Orientation, TriangularType >::operator=(), shark::blas::dense_matrix_adaptor< T, Orientation >::operator=(), shark::DataView< shark::Data< LabelType > const >::operator[](), shark::blas::vector_addition< E1, E2 >::operator[](), shark::blas::vector_binary< E1, E2, F >::operator[](), shark::GaussianLayer::parameterDerivative(), shark::TruncatedExponentialLayer::parameterDerivative(), shark::BipolarLayer::parameterDerivative(), shark::BinaryLayer::parameterDerivative(), shark::GaussianLayer::phi(), shark::TruncatedExponentialLayer::phi(), shark::BipolarLayer::phi(), shark::BinaryLayer::phi(), shark::blas::pivotingCholeskyDecomposition(), shark::blas::plus_assign(), shark::blas::matrix_set< RealMatrix >::plus_assign(), shark::blas::kernels::potrf(), shark::GibbsOperator< RBMType >::precomputeHidden(), shark::GibbsOperator< RBMType >::precomputeVisible(), shark::blas::randomRotationMatrix(), shark::RegularizedKernelMatrix< InputType, CacheType >::RegularizedKernelMatrix(), shark::blas::compressed_matrix< T, I >::reserve_row(), shark::blas::triangular_matrix< T, Orientation, TriangularType >::resize(), shark::ROC::ROC(), shark::blas::compressed_matrix< T, I >::row_begin(), shark::blas::compressed_matrix< T, I >::row_end(), shark::blas::rows(), shark::BipolarLayer::sample(), shark::GaussianLayer::sample(), shark::BinaryLayer::sample(), shark::TruncatedExponentialLayer::sample(), shark::blas::triangular_matrix< T, Orientation, TriangularType >::set_element(), shark::blas::vector< std::size_t >::set_element(), shark::blas::dense_vector_adaptor< T >::set_element(), shark::blas::compressed_vector< T, I >::set_filled(), shark::blas::compressed_matrix< T, I >::set_row_filled(), shark::TemperedMarkovChain< Operator >::setBeta(), shark::BoxConstraintHandler< SearchPointType >::setBounds(), shark::ARDKernelUnconstrained< InputType >::setGammaVector(), shark::FFNet< HiddenNeuron, OutputNeuron >::setLayer(), shark::CachedMatrix< Matrix >::setMaxCachedIndex(), shark::LinearKernel< InputType >::setParameterVector(), shark::LinearRegression::setParameterVector(), shark::DiscreteKernel::setParameterVector(), shark::MonomialKernel< InputType >::setParameterVector(), shark::ImpulseNoiseModel::setParameterVector(), shark::LDA::setParameterVector(), shark::Softmax::setParameterVector(), shark::GaussianNoiseModel::setParameterVector(), shark::ARDKernelUnconstrained< InputType >::setParameterVector(), shark::CMACMap::setParameterVector(), shark::ProductKernel< InputType >::setParameterVector(), shark::PolynomialKernel< InputType >::setParameterVector(), shark::LassoRegression< InputVectorType >::setParameterVector(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::WeightedSumKernel< InputType >::setParameterVector(), shark::Normalizer< DataType >::setParameterVector(), shark::ExampleModifiedKernelMatrix< InputType, CacheType >::setScalingCoefficients(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::setStructure(), shark::FFNet< HiddenNeuron, OutputNeuron >::setStructure(), shark::QpMcDecomp< Matrix >::solve(), shark::QpMcDecomp< Matrix >::solveSMO(), shark::splitAtElement(), shark::NestedGridSearch::step(), shark::blas::subrange(), shark::BipolarLayer::sufficientStatistics(), shark::GaussianLayer::sufficientStatistics(), shark::BinaryLayer::sufficientStatistics(), shark::TruncatedExponentialLayer::sufficientStatistics(), shark::blas::symm_prod(), shark::blas::kernels::tpmv(), shark::blas::trace(), shark::NormalizeComponentsWhitening::train(), shark::NormalTrainer::train(), shark::NBClassifierTrainer< InputType, OutputType >::train(), shark::LassoRegression< InputVectorType >::train(), shark::CVFolds< DatasetType >::training(), shark::CVFolds< DatasetType >::trainingFoldIndices(), shark::blas::kernels::trmm(), shark::blas::kernels::trmv(), shark::blas::kernels::trsm(), shark::blas::kernels::trsv(), shark::Truncate::Truncate(), shark::TruncateAndRescale::TruncateAndRescale(), shark::statistics::ResultTable< Parameter >::update(), shark::BoxConstrainedProblem< Problem >::updateAlphaStatus(), shark::SvmProblem< Problem >::updateAlphaStatus(), shark::BoxConstrainedShrinkingProblem< Problem >::updateGradientEdge(), shark::QpMcSimplexDecomp< Matrix >::updateSMO(), shark::QpMcBoxDecomp< Matrix >::updateSMO(), shark::BoxConstrainedProblem< Problem >::updateSMO(), shark::SvmProblem< Problem >::updateSMO(), shark::CVFolds< DatasetType >::validation(), shark::CVFolds< DatasetType >::validationFoldIndices(), shark::blas::vector_addition< E1, E2 >::vector_addition(), shark::blas::vector_binary< E1, E2, F >::vector_binary(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::weightedDerivatives(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::weightedDerivatives(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedDerivatives(), shark::LinearKernel< InputType >::weightedInputDerivative(), shark::ScaledKernel< InputType >::weightedInputDerivative(), shark::MonomialKernel< InputType >::weightedInputDerivative(), shark::ConvexCombination::weightedInputDerivative(), shark::GaussianRbfKernel< InputType >::weightedInputDerivative(), shark::LinearModel< VectorType >::weightedInputDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedInputDerivative(), shark::PolynomialKernel< InputType >::weightedInputDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::weightedInputDerivative(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::weightedInputDerivative(), shark::WeightedSumKernel< InputType >::weightedInputDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedInputDerivative(), shark::LinearNorm::weightedParameterDerivative(), shark::LinearKernel< InputType >::weightedParameterDerivative(), shark::MonomialKernel< InputType >::weightedParameterDerivative(), shark::ConvexCombination::weightedParameterDerivative(), shark::GaussianRbfKernel< InputType >::weightedParameterDerivative(), shark::LinearModel< VectorType >::weightedParameterDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedParameterDerivative(), shark::PolynomialKernel< InputType >::weightedParameterDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::weightedParameterDerivative(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::weightedParameterDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedParameterDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedParameterDerivativeFullDelta(), and shark::FFNet< HiddenNeuron, OutputNeuron >::write().

§ TYPE_CHECK

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

Definition at line 109 of file Exception.h.

Function Documentation

§ THROW_IF()

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 98 of file Exception.h.

References SHARKEXCEPTION.