- Author
- Alexander Sherikov
- Copyright
- 2018-2020 Alexander Sherikov, Licensed under the Apache License, Version 2.0. (see LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
Definition in file writer.cpp.
Go to the source code of this file.
#include <boost/math/special_functions.hpp>
#include <ariles2/visitors/yaml_cpp.h>
#include <yaml-cpp/yaml.h>
◆ ARILES2_BASIC_TYPE [1/2]
#define ARILES2_BASIC_TYPE |
( |
|
type | ) |
|
Value: void Writer::writeElement(
const type &element,
const Parameters &) \
{ \
*impl_->emitter_ << element; \
}
visitor::Parameters Parameters
Definition at line 178 of file writer.cpp.
◆ ARILES2_BASIC_TYPE [2/2]
#define ARILES2_BASIC_TYPE |
( |
|
type | ) |
|
Value: void Writer::writeElement(
const type &element,
const Parameters &) \
{ \
if (boost::math::isnan(element)) \
{ \
*impl_->emitter_ << ".nan"; \
} \
else \
{ \
if (boost::math::isinf(element)) \
{ \
if (element < 0.0) \
{ \
*impl_->emitter_ << "-.inf"; \
} \
else \
{ \
*impl_->emitter_ << ".inf"; \
} \
} \
else \
{ \
*impl_->emitter_ << static_cast<double>(element); \
} \
} \
}
Definition at line 178 of file writer.cpp.