52 ,
const std::string & name,
bool throw_excpt, std::ostream*
out )
56 std::ostringstream omsg;
58 <<
"The scalar \"" << name
59 <<
"\" = " << val <<
" is not a valid bounded number";
61 *out << omsg.str() << std::endl;
74 ,
const std::string & name,
bool throw_excpt, std::ostream*
out )
77 bool has_nan_or_inf =
false;
78 bool printed_header =
false;
85 <<
"The vector \"" << name
86 <<
"\" has the following NaN or Inf entries\n";
87 printed_header =
true;
90 << name <<
"(" << v_itr - v.
begin() + 1 <<
") = "
91 << *v_itr << std::endl;
93 has_nan_or_inf =
true;
96 if( has_nan_or_inf && throw_excpt ) {
99 std::ostringstream omsg;
101 <<
"assert_print_nan_inf(...) : Error, the vector named "
102 << name <<
" has at least one element which is NaN or Inf";
106 return !has_nan_or_inf;
110 ,
const std::string & name,
bool throw_excpt, std::ostream*
out )
113 bool has_nan_or_inf =
false;
114 bool printed_header =
false;
121 if(!printed_header) {
123 <<
"The matrix \"" << name
124 <<
"\" has the following NaN or Inf entries\n";
125 printed_header =
true;
128 << name <<
"(" << v_itr - v.
begin() + 1 <<
"," << j <<
") = "
129 << *v_itr << std::endl;
131 has_nan_or_inf =
true;
136 if( has_nan_or_inf && throw_excpt ) {
139 std::ostringstream omsg;
141 <<
"assert_print_nan_inf(...) : Error, the matrix named "
142 << name <<
" has at least one element which is NaN or Inf";
146 return has_nan_or_inf;
Teuchos::Ordinal size_type
Typedef for the size type of elements that are used by the library.
size_type cols() const
Return the number of columns.
bool assert_print_nan_inf(const value_type &val, const std::string &name, bool throw_excpt, std::ostream *out)
C++ Standard Library compatable iterator class for accesing nonunit stride arrays of data...
int RTOp_is_nan_inf(RTOp_value_type val)
FortranTypes::f_dbl_prec value_type
Typedef for the value type of elements that is used for the library.
DVectorSlice col(size_type j)
Return DVectorSlice object representing the jth column (1-based; 1,2,..,#this->cols()#, or throw std::out_of_range)