Defines | |
#define | it_assert0(t, s) (void)((t) || (itpp::it_assert_f(#t,s,__FILE__,__LINE__),0)) |
#define | it_assert1(t, s) (void)((t) || (itpp::it_assert_f(#t,s,__FILE__,__LINE__),0)) |
#define | it_assert(t, s) (void)((t) || (itpp::it_assert_f(#t,s,__FILE__,__LINE__),0)) |
Abort if t is NOT true and output s . | |
#define | it_error_if(t, s) (void)((!(t)) || (itpp::it_error_f(s,__FILE__,__LINE__),0)) |
Abort if t is true and output s . | |
#define | it_error(s) itpp::it_error_f(s,__FILE__,__LINE__) |
Abort and output s . | |
#define | it_warning(s) itpp::it_warning_f(s,__FILE__,__LINE__) |
Output the warning s . | |
Functions | |
void | itpp::it_assert_f (std::string ass, std::string msg, std::string file, int line) |
Helper function for the it_assert functions. | |
void | itpp::it_error_f (std::string msg, std::string file, int line) |
Helper function for the it_error functions. | |
void | itpp::it_warning_f (std::string msg, std::string file, int line) |
Helper function for the it_warning functions. | |
void | itpp::it_enable_exceptions (bool on) |
Enable/disable using exceptions for error handling. | |
void | itpp::it_enable_warnings () |
Enable warnings. | |
void | itpp::it_disable_warnings () |
Disable warnings. | |
void | itpp::it_redirect_warnings (std::ostream *warn_stream) |
Redirect warnings to the ostream warn_stream. |
s
is a string that is displayed.
it_assert(t,s); // Abort if \c t is not true. it_assert0(t,s); // Abort if \c t is not true and ASSERT_LEVEL = 2 it_assert1(t,s); // Abort if \c t is not true and ASSERT_LEVEL = 2 or 1 it_error_if(t,s); // Abort if \c t is true. it_error(s); // Abort. it_warning(s); // Show a warning.
it_assert()
, it_error()
and it_warning()
is always active while it_assert0()
and it_assert1()
depends on the ASSERT_LEVEL
variable. If ASSERT_LEVEL
== 0 then none of these are executed while if it is 1 only it_assert1()
is executed.
#define it_assert0 | ( | t, | |||
s | ) | (void)((t) || (itpp::it_assert_f(#t,s,__FILE__,__LINE__),0)) |
Abort if t
is not true and IT++ is compiled with -DASSERT_LEVEL=2
The message string s
is printed on standard output.
Definition at line 93 of file itassert.h.
Referenced by itpp::Sparse_Vec< T >::add(), itpp::Sparse_Vec< T >::add_elem(), itpp::Sparse_Mat< T >::add_elem(), itpp::GF2mat::add_rows(), itpp::GF2mat::addto_element(), itpp::bin::bin(), itpp::GFX::clear(), itpp::Sparse_Vec< T >::clear_elem(), itpp::Sparse_Mat< T >::clear_elem(), itpp::elem_mult(), itpp::elem_mult_s(), itpp::Vec< bmat >::get(), itpp::Mat< unsigned short int >::get(), itpp::GF2mat::get(), itpp::Circular_Buffer< T >::get(), itpp::Sparse_Mat< T >::get_submatrix(), itpp::Sparse_Mat< T >::get_submatrix_cols(), itpp::Sparse_Vec< T >::get_subvector(), itpp::GFX::GFX(), itpp::LLR_calc_unit::logexp(), itpp::mult_trans(), itpp::operator *(), itpp::GFX::operator *=(), itpp::GF::operator *=(), itpp::GFX::operator()(), itpp::Vec< bmat >::operator()(), itpp::Sparse_Vec< T >::operator()(), itpp::Sparse_Mat< T >::operator()(), itpp::Mat< unsigned short int >::operator()(), itpp::Array< T >::operator()(), itpp::Array< DOPPLER_SPECTRUM >::operator()(), itpp::operator+(), itpp::GFX::operator+=(), itpp::GF::operator+=(), itpp::Sparse_Vec< T >::operator+=(), itpp::Sparse_Mat< T >::operator+=(), itpp::Sparse_Vec< T >::operator-=(), itpp::Sparse_Mat< T >::operator-=(), itpp::operator/(), itpp::GF::operator/=(), itpp::GF::operator=(), itpp::bin::operator=(), itpp::GFX::operator[](), itpp::Vec< bmat >::operator[](), itpp::Circular_Buffer< T >::peek(), itpp::Circular_Buffer< T >::peek_reverse(), itpp::GFX::set(), itpp::GF::set(), itpp::Vec< bmat >::set(), itpp::Sparse_Vec< T >::set(), itpp::Sparse_Mat< T >::set(), itpp::Mat< unsigned short int >::set(), itpp::GF2mat::set(), itpp::GFX::set_degree(), itpp::Sparse_Vec< T >::set_new(), itpp::Sparse_Mat< T >::set_new(), itpp::GF2mat::swap_cols(), itpp::GF2mat::swap_rows(), itpp::GF2mat::T_fact_update_addcol(), itpp::LLR_calc_unit::to_qllr(), itpp::trans_mult(), itpp::Sparse_Vec< T >::zero_elem(), and itpp::Sparse_Mat< T >::zero_elem().
#define it_assert1 | ( | t, | |||
s | ) | (void)((t) || (itpp::it_assert_f(#t,s,__FILE__,__LINE__),0)) |
Abort if t
is not true and IT++ is compiled with -DASSERT_LEVEL=1
or -DASSERT_LEVEL=2
. The message string s
is printed on standard output.
Definition at line 97 of file itassert.h.
Referenced by itpp::Vec< bmat >::alloc(), itpp::Mat< unsigned short int >::alloc(), itpp::assert_fixshift(), itpp::backslash(), itpp::GF2mat::bvecify(), itpp::compare_spectra(), itpp::concat_horizontal(), itpp::concat_vertical(), itpp::GF2mat::concatenate_horizontal(), itpp::GF2mat::concatenate_vertical(), itpp::conference(), itpp::Mat< Num_T >::copy_col(), itpp::Mat< Num_T >::copy_row(), itpp::Vec< Num_T >::del(), itpp::Mat< Num_T >::del_col(), itpp::Mat< Num_T >::del_cols(), itpp::Mat< Num_T >::del_row(), itpp::Mat< Num_T >::del_rows(), itpp::det(), itpp::dht(), itpp::dot(), itpp::eig(), itpp::eig_sym(), itpp::elem_div(), itpp::elem_mult(), itpp::Vec< Num_T >::get(), itpp::Mat< Num_T >::get_col(), itpp::Mat< Num_T >::get_cols(), itpp::Mat< Num_T >::get_row(), itpp::Mat< Num_T >::get_rows(), itpp::GF2mat::get_submatrix(), itpp::GF2mat::GF2mat(), itpp::hadamard(), itpp::hamming_distance(), itpp::Fix_Base::init(), itpp::Vec< Num_T >::ins(), itpp::Mat< Num_T >::ins_col(), itpp::Mat< Num_T >::ins_row(), itpp::inv(), itpp::GF2mat::inverse(), itpp::Vec< Num_T >::left(), itpp::lininterp(), itpp::ls_solve(), itpp::ls_solve_chol(), itpp::ls_solve_od(), itpp::ls_solve_ud(), itpp::Fix::lshift(), itpp::CFix::lshift(), itpp::lu(), itpp::Mat< unsigned short int >::Mat(), itpp::Vec< Num_T >::mid(), itpp::mult_trans(), itpp::operator *(), itpp::Mat< Num_T >::operator *=(), itpp::Fix::operator double(), itpp::CFix::operator std::complex(), itpp::Vec< Num_T >::operator()(), itpp::Mat< Num_T >::operator()(), itpp::operator+(), itpp::Vec< Num_T >::operator+=(), itpp::Mat< Num_T >::operator+=(), itpp::operator-(), itpp::Vec< Num_T >::operator-=(), itpp::Mat< Num_T >::operator-=(), itpp::operator/(), itpp::Vec< Num_T >::operator/=(), itpp::Mat< Num_T >::operator/=(), itpp::Fix::operator<<=(), itpp::CFix::operator<<=(), itpp::Vec< Num_T >::operator=(), itpp::Mat< Num_T >::operator=(), itpp::GF2mat::operator==(), itpp::outer_product(), itpp::GF2mat::permute_cols(), itpp::GF2mat::permute_rows(), itpp::ppm_write(), itpp::raw16be_read(), itpp::raw16le_read(), itpp::Vec< Num_T >::replace_mid(), itpp::reshape(), itpp::Vec< Num_T >::right(), itpp::Fix_Base::rshift_and_apply_q_mode(), itpp::Fix_Base::scale_and_apply_modes(), itpp::schur(), itpp::self_dht(), itpp::Mat< Num_T >::set_col(), itpp::GF2mat::set_col(), itpp::set_fix(), itpp::Mat< Num_T >::set_row(), itpp::GF2mat::set_row(), itpp::Vec< Num_T >::set_size(), itpp::Mat< Num_T >::set_size(), itpp::Array< T >::set_subarray(), itpp::Sparse_Mat< T >::set_submatrix(), itpp::Mat< Num_T >::set_submatrix(), itpp::Vec< Num_T >::set_subvector(), itpp::Vec< Num_T >::shift_left(), itpp::Array< T >::shift_left(), itpp::Vec< Num_T >::shift_right(), itpp::Array< T >::shift_right(), itpp::spectrum(), itpp::Vec< Num_T >::split(), itpp::Array< T >::swap(), itpp::Mat< Num_T >::swap_cols(), itpp::Mat< Num_T >::swap_rows(), itpp::GF2mat::T_fact_update_addcol(), itpp::to(), itpp::to_cmat(), itpp::Fix::unfix(), itpp::CFix::unfix(), itpp::upsample(), and itpp::Vec< bmat >::Vec().
#define it_assert | ( | t, | |||
s | ) | (void)((t) || (itpp::it_assert_f(#t,s,__FILE__,__LINE__),0)) |
Abort if t
is NOT true and output s
.
Definition at line 101 of file itassert.h.
Referenced by itpp::Circular_Buffer< T >::alloc(), itpp::arma_estimator(), itpp::backward_substitution(), itpp::Base_Event::Base_Event(), itpp::bidiag(), itpp::binom(), itpp::binom_i(), itpp::Selective_Repeat_ARQ_Sender::buffer_size(), itpp::TDL_Channel::calc_frequency_response(), itpp::TDL_Channel::calc_impulse_response(), itpp::Pulse_Shape< T1, T2, T3 >::clear(), itpp::TCP_Segment::combine(), itpp::BLERC::count(), itpp::cross(), itpp::cumsum(), itpp::Turbo_Codec::decode(), itpp::Turbo_Codec::decode_block(), itpp::Turbo_Codec::decode_n3(), itpp::Channel_Specification::discretize(), itpp::Turbo_Codec::encode_block(), itpp::TTimer< TCP_Sender >::ExpirationTime(), itpp::filter(), itpp::filter_design_autocorrelation(), itpp::find(), itpp::forward_substitution(), itpp::gcd(), itpp::TDL_Channel::generate(), itpp::IFFT_Fading_Generator::generate_Jakes(), itpp::Sparse_Mat< T >::get_col(), itpp::Channel_Specification::get_doppler_spectrum(), itpp::Root_Raised_Cosine< T1 >::get_roll_off(), itpp::Raised_Cosine< T1 >::get_roll_off(), itpp::Line_Search::get_solution(), itpp::Newton_Search::get_solution(), itpp::ARMA_Filter< T1, T2, T3 >::get_state(), itpp::AR_Filter< T1, T2, T3 >::get_state(), itpp::MA_Filter< T1, T2, T3 >::get_state(), itpp::Gold::Gold(), itpp::in_sequence(), itpp::TDL_Channel::init(), itpp::Parser::init(), itpp::int2bits(), itpp::interchange_permutations(), itpp::levels2bits(), itpp::Selective_Repeat_ARQ_Sender::link_packets_buffered(), itpp::Selective_Repeat_ARQ_Sender::link_packets_max_queuing_time(), itpp::Selective_Repeat_ARQ_Sender::link_packets_queued_waiting_for_transmission(), itpp::log_binom(), itpp::Rec_Syst_Conv_Code::log_decode(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), itpp::Modulator_NCD::map_demod(), itpp::Modulator_NRD::map_demod(), itpp::max(), itpp::min(), itpp::modified_yule_walker(), itpp::Modulator_NCD::modulate_bits(), itpp::Modulator_NRD::modulate_bits(), itpp::needed_bits(), itpp::Selective_Repeat_ARQ_Sender::nof_ready_link_packets(), itpp::norm(), itpp::Vec< Num_T >::operator!=(), itpp::Vec< Num_T >::operator()(), itpp::GF::operator/=(), itpp::Vec< Num_T >::operator<(), itpp::Vec< Num_T >::operator<=(), itpp::Vec< Num_T >::operator==(), itpp::Vec< Num_T >::operator>(), itpp::Vec< Num_T >::operator>=(), itpp::permutation_matrix(), itpp::prod(), itpp::Sparse_Vec< T >::resize_data(), itpp::rotation_matrix(), itpp::Line_Search::search(), itpp::Newton_Search::search(), itpp::Modulator_2d::set(), itpp::Modulator_1d::set(), itpp::TCP_Segment::set_begin(), itpp::Packet::set_bit_size(), itpp::TDL_Channel::set_channel_profile(), itpp::Channel_Specification::set_channel_profile(), itpp::TDL_Channel::set_channel_profile_exponential(), itpp::TDL_Channel::set_channel_profile_uniform(), itpp::Spread_2d::set_code(), itpp::CRC_Code::set_code(), itpp::Convolutional_Code::set_code(), itpp::Multicode_Spread_2d::set_codes(), itpp::ARMA_Filter< T1, T2, T3 >::set_coeffs(), itpp::AR_Filter< T1, T2, T3 >::set_coeffs(), itpp::MA_Filter< T1, T2, T3 >::set_coeffs(), itpp::Sparse_Mat< T >::set_col(), itpp::TDL_Channel::set_doppler_spectrum(), itpp::TCP_Segment::set_end(), itpp::ACK_Channel::set_errors(), itpp::Packet_Channel::set_errors(), itpp::FIR_Fading_Generator::set_filter_length(), itpp::CRC_Code::set_generator(), itpp::ND_UPAM::set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), itpp::ND_UQAM::set_Gray_QAM(), itpp::TDL_Channel::set_LOS(), itpp::Channel_Specification::set_LOS(), itpp::Fading_Generator::set_LOS(), itpp::QAM::set_M(), itpp::PSK::set_M(), itpp::PAM::set_M(), itpp::Line_Search::set_max_iterations(), itpp::Line_Search::set_max_stepsize(), itpp::Rice_Fading_Generator::set_no_frequencies(), itpp::TDL_Channel::set_norm_doppler(), itpp::Fading_Generator::set_norm_doppler(), itpp::Selective_Repeat_ARQ_Sender::set_parameters(), itpp::Poisson_Packet_Generator::set_parameters(), itpp::Packet_Generator::set_parameters(), itpp::ACK_Channel::set_parameters(), itpp::Packet_Channel::set_parameters(), itpp::Turbo_Codec::set_parameters(), itpp::OFDM::set_parameters(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), itpp::Raised_Cosine< T1 >::set_pulse_shape(), itpp::GF::set_size(), itpp::LFSR::set_state(), itpp::Random_Generator::set_state(), itpp::ARMA_Filter< T1, T2, T3 >::set_state(), itpp::AR_Filter< T1, T2, T3 >::set_state(), itpp::MA_Filter< T1, T2, T3 >::set_state(), itpp::Rice_Fading_Generator::set_time_offset(), itpp::Bernoulli_RNG::setup(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols(), itpp::Gold::shift(), itpp::LFSR::shift(), itpp::Sink::Sink(), itpp::ND_UPAM::sphere_decoding(), itpp::sub_m_v_vT(), itpp::sub_v_vT_m(), itpp::sum(), itpp::sum_sqr(), itpp::TCP_Segment::TCP_Segment(), itpp::to_cvec(), itpp::toeplitz(), itpp::tridiag(), itpp::wcdma_spreading_codes(), itpp::wcdma_turbo_interleaver_sequence(), itpp::xcorr_old(), itpp::yulewalk(), and itpp::zero_pad().
#define it_error_if | ( | t, | |||
s | ) | (void)((!(t)) || (itpp::it_error_f(s,__FILE__,__LINE__),0)) |
Abort if t
is true and output s
.
Definition at line 103 of file itassert.h.
Referenced by acosh(), atanh(), itpp::chirp(), itpp::Convolutional_Code::decode_tail(), itpp::Convolutional_Code::decode_tailbite(), itpp::Convolutional_Code::decode_trunc(), itpp::GMM::draw_sample(), itpp::erfinv(), itpp::fact(), itpp::Punctured_Convolutional_Code::inverse_tail(), itpp::Convolutional_Code::inverse_tail(), itpp::GMM::join(), itpp::GMM::likelihood_aposteriori(), itpp::Vector_Quantizer::load(), itpp::GMM::load(), itpp::lsf2poly(), itpp::GMM::marginalize(), itpp::it_file::open(), itpp::Stack< T >::peek(), itpp::poly2ac(), itpp::poly2cepstrum(), itpp::polyval(), itpp::Stack< T >::pop(), itpp::Stack< T >::push(), itpp::Vector_Quantizer::set_codevector(), itpp::Convolutional_Code::set_generator_polynomials(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), itpp::Raised_Cosine< T1 >::set_pulse_shape(), itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape(), itpp::Punctured_Convolutional_Code::set_puncture_matrix(), itpp::GF::set_size(), itpp::Convolutional_Code::set_start_state(), itpp::Convolutional_Code::set_truncation_length(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), and itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols().
#define it_error | ( | s | ) | itpp::it_error_f(s,__FILE__,__LINE__) |
Abort and output s
.
Definition at line 105 of file itassert.h.
Referenced by itpp::Circular_Buffer< T >::alloc(), itpp::Fix_Base::apply_o_mode(), itpp::assert_shifts(), itpp::dct(), itpp::Reed_Solomon::decode(), itpp::Punctured_Convolutional_Code::decode(), itpp::Hamming_Code::decode(), itpp::Extended_Golay::decode(), itpp::Convolutional_Code::decode(), itpp::BCH::decode(), itpp::Turbo_Codec::decode_block(), itpp::fft(), itpp::fft_real(), itpp::IFFT_Fading_Generator::generate(), itpp::Parser::get_bmat(), itpp::Parser::get_bool(), itpp::Parser::get_bvec(), itpp::Parser::get_double(), itpp::Parser::get_imat(), itpp::Parser::get_int(), itpp::Parser::get_ivec(), itpp::Parser::get_mat(), itpp::Parser::get_smat(), itpp::Parser::get_string(), itpp::Parser::get_svec(), itpp::Parser::get_vec(), itpp::GF2mat::GF2mat(), itpp::Gold::Gold(), itpp::idct(), itpp::ifft(), itpp::ifft_real(), itpp::Fix_Base::init(), itpp::TDL_Channel::init(), itpp::FIR_Fading_Generator::init(), itpp::Rice_Fading_Generator::init(), itpp::Rice_Fading_Generator::init_MEDS(), itpp::Rec_Syst_Conv_Code::log_decode(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), itpp::it_file::open(), itpp::it_ifile::open(), itpp::Vec< std::complex< double > >::operator!=(), itpp::Vec< std::complex< double > >::operator<(), itpp::operator<<(), itpp::Vec< std::complex< double > >::operator<=(), itpp::Vec< Num_T >::operator=(), itpp::Vec< std::complex< double > >::operator==(), itpp::Vec< std::complex< double > >::operator>(), itpp::Vec< std::complex< double > >::operator>=(), itpp::operator>>(), itpp::pgm_read(), itpp::pnm_read_header(), itpp::ppm_read(), itpp::Fix_Base::rshift_and_apply_q_mode(), itpp::Fix_Base::scale_and_apply_modes(), itpp::Vec< std::complex< double > >::set(), itpp::TDL_Channel::set_channel_profile_exponential(), itpp::Turbo_Codec::set_metric(), itpp::Fix_Base::set_output_mode(), itpp::Turbo_Codec::set_parameters(), itpp::GF2mat::T_fact_update_bitflip(), itpp::it_file::write_data_header(), and itpp::xcorr_old().
#define it_warning | ( | s | ) | itpp::it_warning_f(s,__FILE__,__LINE__) |
Output the warning s
.
Definition at line 107 of file itassert.h.
Referenced by itpp::chol(), itpp::Punctured_Convolutional_Code::decode_tail(), itpp::Punctured_Convolutional_Code::decode_tailbite(), itpp::Punctured_Convolutional_Code::decode_trunc(), itpp::Channel_Specification::discretize(), itpp::Line_Search::get_alpha(), itpp::Newton_Search::get_function_value(), itpp::Fast_ICA::get_independent_components(), itpp::Fast_ICA::get_mixing_matrix(), itpp::Line_Search::get_no_function_evaluations(), itpp::Newton_Search::get_no_function_evaluations(), itpp::Newton_Search::get_no_iterations(), itpp::GMM::get_no_mixtures(), itpp::Fast_ICA::get_separating_matrix(), itpp::Line_Search::get_slope_ratio(), itpp::Newton_Search::get_stop_1(), itpp::Newton_Search::get_stop_2(), itpp::Line_Search::get_trace(), itpp::Newton_Search::get_trace(), itpp::QAM::modulate_bits(), itpp::PSK::modulate_bits(), itpp::QPSK::modulate_bits(), itpp::PAM::modulate_bits(), itpp::needed_bits(), itpp::it_file::pack(), itpp::pgm_read(), itpp::ppm_write(), itpp::quadlstep(), itpp::quadstep(), itpp::SND_In_File::read(), itpp::SND_Format::read_header(), itpp::SND_Out_File::write(), and itpp::xcorr().
void itpp::it_assert_f | ( | std::string | ass, | |
std::string | msg, | |||
std::string | file, | |||
int | line | |||
) |
Helper function for the it_assert
functions.
Definition at line 61 of file itassert.cpp.
References itpp::flush().
void itpp::it_error_f | ( | std::string | msg, | |
std::string | file, | |||
int | line | |||
) |
Helper function for the it_error
functions.
Definition at line 84 of file itassert.cpp.
References itpp::flush().
void itpp::it_warning_f | ( | std::string | msg, | |
std::string | file, | |||
int | line | |||
) |
Helper function for the it_warning
functions.
Definition at line 104 of file itassert.cpp.
References itpp::flush().
void itpp::it_enable_exceptions | ( | bool | on | ) |
void itpp::it_enable_warnings | ( | ) |
void itpp::it_disable_warnings | ( | ) |
void itpp::it_redirect_warnings | ( | std::ostream * | warn_stream | ) |
Generated on Fri Jun 8 00:27:21 2007 for IT++ by Doxygen 1.5.2