|
ASL 0.1.7
Advanced Simulation Library
|
useful common utilities More...
#include "acl/cl.hpp"#include "acl/aclStdIncludes.h"#include <cmath>#include <iostream>#include <sstream>#include <iomanip>#include <vector>#include <memory>#include <list>#include <typeinfo>

Go to the source code of this file.
Classes | |
| class | asl::I2T< I > |
| This class is used in order to overload function according to an integer parameter. More... | |
| class | asl::comparatorIndeces< T1 > |
Namespaces | |
| namespace | asl |
| Advanced Simulation Library. | |
Functions | |
| template<typename T> | |
| std::string | asl::numToStr (T i) |
| Converts numbers or another type to string. | |
| template<typename T> | |
| std::string | asl::numToStr (T i, int numberOf0) |
| Converts numbers or another type to string with given value of positions with 0 before. | |
| template<typename T> | |
| T | asl::strToNum (std::string s) |
| Converts string to number, exits if not able to convert. | |
| template<int I> | |
| const double | asl::P (const double &a) |
| Realization of \( a^I \). | |
| template<int I> | |
| const float | asl::P (const float &a) |
| template<int I> | |
| const int | asl::P (const int &a) |
| template<typename T> | |
| bool | asl::in (const T &xx, const T &x1, const T &x2) |
| Checks the belonging to a closed interval [x1,x2], \( xx \in [x1,x2] \). | |
| template<typename T> | |
| bool | asl::inO (const T &xx, const T &x1, const T &x2) |
| Checks the belonging to an open interval (x1,x2), \( xx \in (x1,x2) \). | |
| const double | asl::deg (double a) |
| Translation radians to degrees. | |
| const float | asl::deg (float a) |
| const double | asl::rad (double a) |
| Translation degrees to radians. | |
| const float | asl::rad (float a) |
| const bool | asl::approxEqual (const double &a, const double &b, const double p_=1e-6) |
Approximately equal; the precision is defined as p_. | |
| const bool | asl::approxEqual (const float &a, const float &b, const float p_=1e-6) |
| void | asl::errorMessage (cl_int status, const char *errorMessage) |
| Prints errorMessage and exits depending on the status. | |
| void | asl::errorMessage (cl_int status, const std::string &errorMessage) |
| Prints errorMessage and exits depending on the status. | |
| void | asl::errorMessage (bool status) |
| Prints " Ok" or " ERROR" depending on status. | |
| void | asl::errorMessage (const char *errorMessage) |
| Prints errorMessage and exits. | |
| void | asl::errorMessage (const std::string &errorMessage) |
| Prints errorMessage and exits. | |
| void | asl::warningMessage (const char *warningMessage) |
| Prints warningMessage. | |
| void | asl::warningMessage (const std::string &warningMessage) |
| Prints warningMessage. | |
| std::string | asl::warningString (const char *warningMessage) |
| Returns warningMessage. | |
| template<typename T> | |
| std::ostream & | asl::operator<< (std::ostream &output, const std::vector< T > &vector) |
| Prints elements of the vector separated by space. | |
| template<typename T> | |
| bool | asl::operator== (const std::vector< T > &vector1, const std::vector< T > &vector2) |
| Compares two vectors. | |
| template<class T, int N> | |
| void | asl::output1OfN (const std::string &s) |
Makes output 1 of n times. | |
| template<class T> | |
| void | asl::setupAll (std::vector< std::shared_ptr< T > > &v) |
| template<class T> | |
| void | asl::computeAll (std::vector< std::shared_ptr< T > > &v) |
| template<class T1, class T2> | |
| void | asl::sortTwoVectors (std::vector< T1 > &v1, std::vector< T2 > &v2) |
| sorts two vectors with respect of the fist one | |
| template<class T> | |
| void | asl::reorderVector (std::vector< unsigned int > &ind, std::vector< T > &v) |
| reorders vector according to indeces | |
useful common utilities
Definition in file aslUtilities.h.