Main MRPT website > C++ reference for MRPT 1.9.9
Functions
Round functions (in #include <mrpt/core/round.h>)

Detailed Description

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 23 of file round.h.

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::vision::computeHistogramOfOrientations(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_Thrun(), mrpt::vision::computeMoreDescriptors(), mrpt::vision::computeMultiOrientations(), mrpt::vision::computeMultiResolutionDescriptors(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_CellsDifference(), mrpt::maps::COccupancyGridMap2D::computePathCost(), mrpt::img::CImage::cross_correlation(), 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::extractFeaturesFASTER_N(), mrpt::vision::CFeatureExtraction::extractFeaturesKLT(), mrpt::vision::CFeatureExtraction::extractFeaturesLSD(), mrpt::vision::CFeatureExtraction::extractFeaturesORB(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::vision::CFeatureExtraction::extractFeaturesSURF(), mrpt::vision::TSimpleFeatureTraits< TSimpleFeature >::f2coord(), mrpt::maps::COccupancyGridMap2D::findCriticalPoints(), mrpt::obs::CObservationVelodyneScan::generatePointCloud(), mrpt::maps::COccupancyGridMap2D::getAsImageFiltered(), mrpt::nav::CPTG_Holo_Blend::getPathStepForDist(), mrpt::img::CMappedImage::getPixel(), mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KernelDM_DMV(), mrpt::vision::CFeatureExtraction::internal_computeSpinImageDescriptors(), mrpt::maps::CBeaconMap::internal_insertObservation(), mrpt::maps::COccupancyGridMap2D::internal_insertObservation(), mrpt::maps::CPointsMap::internal_insertObservation(), mrpt::slam::KLF_loadBinFromParticle(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::loadTPathBinFromPath(), 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::obs::detail::project3DPointsFromDepthImageInto(), 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< TRandomFieldVoxel >::resize(), mrpt::containers::CDynamicGrid< std::vector< int32_t > >::resize(), mrpt::maps::CRandomFieldGridMap2D::resize(), mrpt::maps::COccupancyGridMap2D::resizeGrid(), mrpt::tfest::se3_l2_robust(), mrpt::nav::CHolonomicND::searchBestGap(), mrpt::vision::TSimpleFeatureList_templ< TSimpleFeature >::setScale(), mrpt::containers::CDynamicGrid< std::vector< int32_t > >::setSize(), mrpt::poses::CPose2DGridTemplate< double >::setSize(), mrpt::containers::CDynamicGrid3D< TRandomFieldVoxel >::setSize(), mrpt::maps::COccupancyGridMap2D::setSize(), mrpt::gui::CDisplayWindow::showImageAndPoints(), 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_addNewFeats_simple_list(), mrpt::vision::detail::trackFeatures_updatePatch< CFeatureList >(), mrpt::img::CCanvas::triangle(), velodyne_scan_to_pointcloud(), mrpt::math::weightedHistogram(), mrpt::math::weightedHistogramLog(), mrpt::poses::CPose2DGridTemplate< double >::x2idx(), and mrpt::poses::CPose2DGridTemplate< double >::y2idx().

◆ 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 51 of file round.h.

References mrpt::round_long(), and val.

◆ round_long()

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

Returns the closer integer (long) to x.

Definition at line 35 of file round.h.

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




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST