rsvs3D
0.0.0
Codes for the c++ implementation of the 3D RSVS
|
Namespace for general purpose tools of the RSVS project. More...
Classes | |
class | VelocityFunction |
class | SnakeVelocityCalculator |
A base class which needs to be inherited from to implement a new velocity calculation. More... | |
class | rsvs_exception |
Exception for signaling rsvs errors. More... | |
Typedefs | |
typedef std::function< void(snake &)> | simplevelocity |
Functions | |
template<class E = rsvs_exception> | |
void | error (const char *message="", const char *caller="", const char *file="", int line=0, bool throwError=true) |
Custom error function. More... | |
template<typename T > | |
int | sign (T val) |
Returns the sign of a type comparable to 0. More... | |
int | TimeStamp (const char *str, int start_s) |
double | SignedLogScale (double in) |
Returns a signed logscale useful for plotting data. More... | |
double | Clock2ms (int clockCycles) |
Namespace for general purpose tools of the RSVS project.
void rsvs3d::error | ( | const char * | message = "" , |
const char * | caller = "" , |
||
const char * | file = "" , |
||
int | line = 0 , |
||
bool | throwError = true |
||
) |
Custom error function.
Displays the name of the caller function and throw an exception type object with the message specified. can be turned off by setting the last parameter to false.
[in] | message | Error message |
[in] | caller | Caller function |
[in] | file | The file in which the caller is. |
[in] | line | The line at which the caller is. |
[in] | throwError | should the error be thrown (True) or a warning (False)? |
E | Exception type to throw |
Convenience macros are also provided to use this function without typing all the file, line and caller function macro names:
Definition at line 203 of file warning.hpp.
int rsvs3d::sign | ( | T | val | ) |
Returns the sign of a type comparable to 0.
[in] | val | The value in. |
T | Any type comparable and with a 0 type. |
Definition at line 215 of file warning.hpp.
double rsvs3d::SignedLogScale | ( | double | in | ) |
Returns a signed logscale useful for plotting data.
This mathematical function is geared towards plotting of data with wildly varying orders of magnitude and has the following properties:
[in] | in | A double to scale. |
Definition at line 40 of file warning.cpp.