Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
NPointsValidator Class Reference

The NPointsValidator class is responsible for validating cones based on the number of points they contain. More...

#include <npoints_validator.hpp>

Inheritance diagram for NPointsValidator:
Inheritance graph
Collaboration diagram for NPointsValidator:
Collaboration graph

Public Member Functions

 NPointsValidator (long unsigned int min_n_points)
 Constructs a new HeightValidator object with the specified height threshold.
 
std::vector< double > coneValidator (Cluster *cone_point_cloud, Plane &plane) const override
 Validates a cone based on its number of points.
 
virtual ~NPointsValidator ()=default
 Virtual destructor for NpointsValidator.
 

Private Attributes

long unsigned int _min_n_points_
 

Detailed Description

The NPointsValidator class is responsible for validating cones based on the number of points they contain.

This class inherits from the ConeValidator class and overrides the coneValidator method to provide point quantity validation logic.

Definition at line 12 of file npoints_validator.hpp.

Constructor & Destructor Documentation

◆ NPointsValidator()

NPointsValidator::NPointsValidator ( long unsigned int  min_n_points)
explicit

Constructs a new HeightValidator object with the specified height threshold.

Parameters
min_n_pointsMin number of points for cone validation.

Definition at line 3 of file npoints_validator.cpp.

◆ ~NPointsValidator()

virtual NPointsValidator::~NPointsValidator ( )
virtualdefault

Virtual destructor for NpointsValidator.

Member Function Documentation

◆ coneValidator()

std::vector< double > NPointsValidator::coneValidator ( Cluster cone_point_cloud,
Plane plane 
) const
overridevirtual

Validates a cone based on its number of points.

This method overrides the coneValidator method of the base class ConeValidator. It validates whether the given cone, represented by a point cloud cluster, meets the minimum number of points criteria.

Parameters
cone_point_cloudPointer to a Cluster object representing the point cloud of the cone.
Returns
vector containing the ratio between the size of cluster and total points on index 0.

Implements ConeValidator.

Definition at line 5 of file npoints_validator.cpp.

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

Member Data Documentation

◆ _min_n_points_

long unsigned int NPointsValidator::_min_n_points_
private

Definition at line 39 of file npoints_validator.hpp.


The documentation for this class was generated from the following files: