19 typedef Eigen::Matrix<unsigned int, Eigen::Dynamic, 1>
IndexVector;
91 return (std::abs(var1 - var2) < tol);
135 return((2. / std::sqrt(2.)) * radius);
168 Location (
const std::size_t offset,
const std::size_t length)
181 bool operator== (
const Location &another_location)
const 183 return ( (offset_ == another_location.
offset_) &&
184 (length_ == another_location.
length_) );
195 bool operator!= (
const Location &another_location)
const 197 return ( !(*
this == another_location) );
210 return ( (offset_ <= end()) &&
211 (end() <= max_length) );
233 return(offset_ + length_);
243 void set(
const std::size_t offset,
const std::size_t length)
259 const std::string & name =
"location")
const 264 logger.log(
LogEntryName(subname).add(
"offset"), offset_);
265 logger.log(
LogEntryName(subname).add(
"length"), length_);
bool checkLength(const std::size_t max_length) const
Check length of location.
std::size_t front() const
Offset of the first element.
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
Represents log entry name.
EIGEN_DEFAULT_DENSE_INDEX_TYPE EigenIndex
Eigen::Matrix< unsigned int, Eigen::Dynamic, 1 > IndexVector
double HUMOTO_LOCAL convertRadiansToDegrees(const double radians)
Convert radians to degrees.
double HUMOTO_LOCAL convertDegreesToRadians(const double degrees)
Convert degrees to radians.
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="location") const
Log hierarchy as a set of tasks.
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
The root namespace of HuMoTo.
std::size_t end() const
Offset of the element following the last element.
LogEntryName & add(const char *name)
extends entry name with a subname
Location(const std::size_t offset, const std::size_t length)
Construct location with given parameters.
bool isApproximatelyEqual(const double var1, const double var2, const double tol=humoto::g_generic_tolerance)
Returns true if the difference between two given variables is below the given tolerance.
Location of a data chunk (offset + length).
const double g_pi
PI constant.
double HUMOTO_LOCAL getEncircledSquareSide(const double radius)
Function computing side length of a square inscribed inside of a circle of given radius.
const double g_generic_tolerance
Generic tolerance, should be used by default.