10 #include <vxl_config.h> 22 *reinterpret_cast<vxl_uint_64*>(&a) = 0x7ff00000000007a2LL;
27 # else // VXL_LITTLE_ENDIAN 31 reinterpret_cast<vxl_uint_32*>(&a)[hw]=0x7ff00000;
32 reinterpret_cast<vxl_uint_32*>(&a)[lw]=0x000007a2;
47 *reinterpret_cast<vxl_uint_32*>(&a) = 0x7f8007a2L;
57 return ((*reinterpret_cast<vxl_uint_64*>(&x))&0xfff7ffffffffffffLL)
58 == 0x7ff00000000007a2LL;
60 return ((reinterpret_cast<vxl_int_32*>(&x)[hw]) & 0xfff7ffff) == 0x7ff00000 &&
61 reinterpret_cast<vxl_int_32*>(&x)[lw] == 0x000007a2;
69 return ((*reinterpret_cast<vxl_uint_32*>(&x))&0xffbfffffL)
90 std::stringstream oneToken(
"");
91 unsigned int char_processed_count = 0;
92 bool period_found =
false;
93 bool current_location_is_delimiter =
false;
96 std::stringstream::char_type c;
97 std::istream::int_type p = is.peek();
98 if ( char_processed_count == 0 ) {
99 if (std::isspace(p)) {
103 if ( p ==
'N' || p ==
'n' ) {
106 if (p ==
'A' || p ==
'a') {
113 std::string checkForNAString;
114 is >> checkForNAString;
121 if (std::isdigit(p) || p ==
'-' || p ==
'+' || p ==
'.') {
123 if ((char_processed_count != 0) && ((p ==
'-') || (p ==
'+'))) {
124 current_location_is_delimiter =
true;
129 current_location_is_delimiter =
true;
136 current_location_is_delimiter =
true;
138 if ( current_location_is_delimiter) {
142 std::stringstream::char_type pp=
' ';
146 ++char_processed_count;
void vnl_na_extract(std::istream &is, double &x)
void vnl_na_insert(std::ostream &os, double x)
Write a floating point number or "NA" to a stream.
Namespace with standard math functions.
NA (Not Available) is a particular double (or single-precision) NaN to represent missing data.
bool isnan(vnl_bignum const &)
double vnl_na_nan_to_na(double v)
Replace NaNs with NA, leave other values alone.
bool vnl_na_isna(double x)
True if parameter is specific NA qNaN.
void vnl_na_extract_type(std::istream &is, T &value)
Read a floating point number or "NA" from a stream.
double vnl_na(double)
A particular qNaN to indicate not available.