rtpkg 0.1.0
A ROS2 example package that contains the publisher and subscriber example of both C++ & Python, with the use of custom message.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rtpkg Class Reference

Public Member Functions

int getRand (int minD, int maxD)
 Function to generate a random number.
 
bool checkPrime (int n)
 Function to check whether the input number is a prime number.
 
float getPrimeRatio ()
 Function to get the ratio of the number of prime number generated over the total number of random number generated.
 
int getCount ()
 Function to get the total number of random number generated.
 
int getMin ()
 Function to get the smallest number generated.
 
int getMax ()
 Function to get the largest number generated.
 

Member Function Documentation

◆ checkPrime()

bool rtpkg::checkPrime ( int n)

Function to check whether the input number is a prime number.

Parameters
n- Input number to be check.
Returns
True if the number supplied is a prime number.

◆ getPrimeRatio()

float rtpkg::getPrimeRatio ( )

Function to get the ratio of the number of prime number generated over the total number of random number generated.

Returns
Float value of the prime number ratio.

◆ getRand()

int rtpkg::getRand ( int minD,
int maxD )

Function to generate a random number.

Parameters
minD- Minimum number value to be generated.
maxD- Maximum number value to be generated.
Returns
The generated random number.

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