Documentation of UrbanFireXDT
Documentation of UrbanFireXDT
Loading...
Searching...
No Matches
Functions
helper.h File Reference
#include <algorithm>
#include <cctype>
#include <cmath>
#include <list>
#include <memory>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

list< list< pair< string, float > > > * cartesian_product (vector< pair< string, shared_ptr< vector< float > > > > &input)
 
int compare_struct_tm (struct tm *a, struct tm *b)
 
float round_float_n (float x, unsigned int decimal_places)
 
float round_float_5 (double x)
 
float round_float_5 (float x)
 
void to_lowercase (std::string &s)
 

Function Documentation

◆ cartesian_product()

list< list< pair< string, float > > > * cartesian_product ( vector< pair< string, shared_ptr< vector< float > > > > &  input)

◆ compare_struct_tm()

int compare_struct_tm ( struct tm *  a,
struct tm *  b 
)

◆ round_float_5() [1/2]

float round_float_5 ( double  x)

Rounds a double on 5 decimal places and returns it as a float

◆ round_float_5() [2/2]

float round_float_5 ( float  x)

Rounds a float on 5 decimal places

◆ round_float_n()

float round_float_n ( float  x,
unsigned int  decimal_places 
)

Rounds a float on n decimal places

◆ to_lowercase()

void to_lowercase ( std::string &  s)

Transform a std::string (only showing ASCII text) to a lower-case string. This is an example from https://en.cppreference.com/w/cpp/string/byte/tolower