MRPT  2.0.4
Functions
Round functions (in #include <mrpt/core/round.h>)

Detailed Description

Collaboration diagram for Round functions (in #include <mrpt/core/round.h>):

Functions

template<typename T >
int mrpt::round (const T value)
 Returns the closer integer (int) to x. More...
 
template<typename T >
long mrpt::round_long (const T value)
 Returns the closer integer (long) to x. More...
 
template<class T >
mrpt::round_10power (T val, int power10)
 Round a decimal number up to the given 10'th power (eg, to 1000,100,10, and also fractions) power10 means round up to: 1 -> 10, 2 -> 100, 3 -> 1000, ... More...
 

Function Documentation

◆ round()

template<typename T >
int mrpt::round ( const T  value)
inline

Returns the closer integer (int) to x.

Definition at line 24 of file round.h.

References mrpt::cpu::SSE2, and mrpt::cpu::supports().

Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), mrpt::maps::CGasConcentrationGridMap2D::build_Gaussian_Wind_Grid(), mrpt::vision::CDifodo::buildCoordinatesPyramid(), mrpt::vision::CDifodo::buildCoordinatesPyramidFast(), mrpt::maps::COccupancyGridMap2D::buildVoronoiDiagram(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CHolonomicND::calcRepresentativeSectorForGap(), mrpt::vision::CDifodo::CDifodo(), mrpt::maps::CLogOddsGridMapLUT< cell_t >::CLogOddsGridMapLUT(), mrpt::maps::COccupancyGridMap2D::computeClearance(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_Thrun(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_CellsDifference(), mrpt::nav::PlannerSimple2D::computePath(), mrpt::maps::COccupancyGridMap2D::computePathCost(), mrpt::obs::CObservation3DRangeScan::convertTo2DScan(), mrpt::nav::ClearanceDiagram::decimated_k_to_real_k(), mrpt::system::decodeBase64(), mrpt::maps::COccupancyGridMap2D::determineMatching2D(), mrpt::nav::CHolonomicND::direction2sector(), mrpt::nav::CHolonomicFullEval::direction2sector(), mrpt::img::CCanvas::drawCircle(), mrpt::slam::CMetricMapBuilderRBPF::drawCurrentEstimationToImage(), mrpt::img::CCanvas::drawFeatures(), mrpt::img::CCanvas::drawFeaturesSimple(), mrpt::img::CEnhancedMetaFile::ellipseGaussian(), mrpt::img::CCanvas::ellipseGaussian(), mrpt::system::encodeBase64(), mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle(), mrpt::nav::CHolonomicFullEval::evalSingleTarget(), mrpt::vision::CFeatureExtraction::extractFeaturesAKAZE(), mrpt::vision::CFeatureExtraction::extractFeaturesFAST(), mrpt::vision::CFeatureExtraction::extractFeaturesKLT(), mrpt::vision::CFeatureExtraction::extractFeaturesLSD(), mrpt::vision::CFeatureExtraction::extractFeaturesORB(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::vision::CFeatureExtraction::extractFeaturesSURF(), mrpt::vision::TKeyPointTraits< TKeyPoint >::f2coord(), mrpt::obs::CObservation2DRangeScan::filterByExclusionAngles(), mrpt::maps::COccupancyGridMap2D::findCriticalPoints(), mrpt::obs::CObservationVelodyneScan::generatePointCloud(), mrpt::maps::COccupancyGridMap2D::getAsImageFiltered(), mrpt::maps::COccupancyGridMap3D::getAsOctoMapVoxels(), mrpt::nav::CPTG_Holo_Blend::getPathStepForDist(), mrpt::img::CMappedImage::getPixel(), mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KernelDM_DMV(), mrpt::maps::COccupancyGridMap3D::insertRay(), mrpt::vision::CFeatureExtraction::internal_computeLogPolarImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computePolarImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSpinImageDescriptors(), mrpt::maps::CBeaconMap::internal_insertObservation(), mrpt::maps::COccupancyGridMap2D::internal_insertObservation(), mrpt::maps::CPointsMap::internal_insertObservation(), mrpt::maps::CHeightGridMap2D_Base::intersectLine3D(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::loadTPathBinFromPath(), mrpt::ros1bridge::MapHdl::MapHdl(), mrpt::vision::CDifodo::odometryCalculation(), mrpt::vision::openCV_cross_correlation(), mrpt::vision::CDifodo::performWarping(), mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal(), mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_implementation_pfStandardProposal(), mrpt::poses::CPose2DGridTemplate< double >::phi2idx(), mrpt::poses::CPose3DGridTemplate< double >::pitch2idx(), mrpt::gui::CDisplayWindow::plot(), mrpt::math::ModelSearch::ransacSingleModel(), mrpt::nav::ClearanceDiagram::real_k_to_decimated_k(), mrpt::opengl::CPointCloudColoured::render_subset(), mrpt::opengl::CPointCloud::render_subset(), mrpt::slam::CMonteCarloLocalization2D::resetUniformFreeSpace(), mrpt::containers::CDynamicGrid3D< TCELL >::resize(), mrpt::containers::CDynamicGrid< std::vector< int32_t > >::resize(), mrpt::maps::CRandomFieldGridMap2D::resize(), mrpt::maps::COccupancyGridMap2D::resizeGrid(), mrpt::poses::CPose3DGridTemplate< double >::roll2idx(), mrpt::apps::CGridMapAlignerApp::run(), mrpt::tfest::se2_l2_robust(), mrpt::tfest::se3_l2_robust(), mrpt::nav::CHolonomicND::searchBestGap(), mrpt::obs::CObservation3DRangeScan::serializeFrom(), mrpt::vision::TKeyPointList_templ< TKeyPoint >::setScale(), mrpt::containers::CDynamicGrid< std::vector< int32_t > >::setSize(), mrpt::poses::CPose2DGridTemplate< double >::setSize(), mrpt::poses::CPose3DGridTemplate< double >::setSize(), mrpt::containers::CDynamicGrid3D< TCELL >::setSize(), mrpt::maps::COccupancyGridMap2D::setSize(), mrpt::gui::CDisplayWindow::showImagesAndMatchedPoints(), mrpt::maps::CGasConcentrationGridMap2D::simulateAdvection(), mrpt::maps::COccupancyGridMap2D::simulateScanRay(), mrpt::maps::COccupancyGridMap2D::sonarSimulator(), mrpt::maps::COccupancyGridMap2D::subSample(), mrpt::maps::detail::loadFromRangeImpl< Derived >::templ_loadFromRangeScan(), mrpt::vision::detail::trackFeatures_addNewFeats< CFeatureList >(), mrpt::vision::detail::trackFeatures_updatePatch< CFeatureList >(), mrpt::img::CCanvas::triangle(), mrpt::obs::detail::unprojectInto(), velodyne_scan_to_pointcloud(), mrpt::math::weightedHistogram(), mrpt::math::weightedHistogramLog(), mrpt::poses::CPose2DGridTemplate< double >::x2idx(), mrpt::poses::CPose3DGridTemplate< double >::x2idx(), mrpt::poses::CPose2DGridTemplate< double >::y2idx(), mrpt::poses::CPose3DGridTemplate< double >::y2idx(), mrpt::poses::CPose3DGridTemplate< double >::yaw2idx(), and mrpt::poses::CPose3DGridTemplate< double >::z2idx().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ round_10power()

template<class T >
T mrpt::round_10power ( val,
int  power10 
)

Round a decimal number up to the given 10'th power (eg, to 1000,100,10, and also fractions) power10 means round up to: 1 -> 10, 2 -> 100, 3 -> 1000, ...

-1 -> 0.1, -2 -> 0.01, ...

Definition at line 58 of file round.h.

References mrpt::round_long(), and val.

Here is the call graph for this function:

◆ round_long()

template<typename T >
long mrpt::round_long ( const T  value)
inline

Returns the closer integer (long) to x.

Definition at line 39 of file round.h.

References mrpt::cpu::SSE2, and mrpt::cpu::supports().

Referenced by mrpt::round_10power(), mrpt::maps::CLandmarksMap::simulateRangeBearingReadings(), and TEST().

Here is the call graph for this function:
Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020