Members | Descriptions |
---|---|
define INLINE |
If defined, funstions will be marked as inline. |
define AI_DIRENT_SUPPORT |
|
define AI_GCC5_SUPPORT |
|
define AI_SHELL_SUPPORT |
|
define STRINGIFY |
Convert a variable name into text. |
define TO_STRING |
Convert a variable value into text. |
define PRINT_LINE |
Print the line number. |
namespace ai |
Main namespace. |
define
INLINE
If defined, funstions will be marked as inline.
If defined, funstions will be marked as inline. Comment the line if you want to omit this behavior
define
AI_DIRENT_SUPPORT
define
AI_GCC5_SUPPORT
define
AI_SHELL_SUPPORT
define
STRINGIFY
Convert a variable name into text.
This macro converts a variable name into text, which is useful for debugging
define
TO_STRING
Convert a variable value into text.
This macro converts a variable value into text, so you can access the constants defined at compile time as std::string
define
PRINT_LINE
Print the line number.
This macro prints the line number on which it was called
Main namespace.
Main namespace containing all the functions of AiLibrary
Members | Descriptions |
---|---|
public INLINE std::string getVersion () |
Get version of the library. |
public template<> INLINE std::string string (const T value) |
Converts input into a string. |
public INLINE bool hasPrefix (const std::string & text,const std::string & prefix) |
Checks if a string begins with a substring. |
public INLINE bool hasSuffix (const std::string & text,const std::string & suffix) |
Checks if a string ends with a substring. |
public INLINE bool contains (const std::string & text,const std::string & substring) |
Checks if a string contains a substring. |
public INLINE std::string replace (std::string text,const std::string & substring,const std::string & replacement) |
Replaces all occurrences of a substring in a copy of the initial string with your text. |
public INLINE void applyReplace (std::string & text,const std::string & substring,const std::string & replacement) |
Modifies your string by replacing all occurrences of a substring string with your text. |
public INLINE bool equal (const char * charString,const std::string string1) |
Checks if a char string is equal to a std::string. |
public INLINE std::string toUpperCase (std::string input) |
Convert a string to upper case. |
public INLINE std::string toLowerCase (std::string input) |
Convert a string to lower case. |
public template<> INLINE std::string prependNumber (const T value,const std::size_t symbolsBeforePoint,const char symbolToPrepend) |
|
public INLINE std::size_t counter (const std::size_t value) |
Returns ID starting from zero or the specified value. |
public INLINE std::string marker (const std::size_t value) |
Returns a string containing the word "Marker" and its ID. |
public INLINE void printMarker (const std::size_t value) |
Calls marker() and prints result to stdout. |
public template<> INLINE T sign (const T value) |
Returns signum of the value. |
public template<> INLINE T min (const T a,const T b) |
Returns minimum of two values. |
public template<> INLINE T max (const T a,const T b) |
Returns maximum of two values. |
public template<> INLINE T min (const std::vector< T > & input) |
Returns minimum of vector values. |
public template<> INLINE T max (const std::vector< T > & input) |
Returns maximum of vector values. |
public template<> INLINE T min (const std::vector< std::vector< T > > & input) |
Returns minimum of matrix values. |
public template<> INLINE T max (const std::vector< std::vector< T > > & input) |
Returns maximum of matrix values. |
public template<> INLINE bool isSquare (const T value) |
Checks if number is square. |
public template<> INLINE bool isSquare (const std::vector< std::vector< T > > & matrix) |
Checks if matrix is square. |
public template<> INLINE void generateRandomVector (std::vector< T > & vector,const std::size_t length,const T min,const T max) |
|
public template<> INLINE void generateRandomMatrix (std::vector< std::vector< T > > & matrix,const std::size_t xSize,const std::size_t ySize,const T min,const T max) |
Fill matrix with random values. |
public template<> INLINE void generateRandomMatrix (std::vector< std::vector< T > > & matrix,const std::size_t size,const T min,const T max) |
Fill matrix with random values. |
public template<> void rotateMatrix (std::vector< std::vector< T > > & matrix,const bool rotateClockwise) |
Rotate square matrix. |
public template<> INLINE void inverseMatrix (std::vector< std::vector< T > > matrix,std::vector< std::vector< T > > & inverse) |
|
public template<> INLINE void inverseMatrix (std::vector< std::vector< T > > & matrix) |
|
public template<> INLINE void translateMatrixIntoVector (std::vector< std::vector< T > > & matrix,std::vector< T > & vector) |
Elongates matrix into a vector. |
public template<> INLINE void translateVectorIntoSquareMatrix (std::vector< T > & vector,std::vector< std::vector< T > > & matrix) |
Transform vector into a square matrix (if possible) |
public template<> INLINE void generateCirculantMatrix (std::vector< std::vector< T > > & matrix,std::vector< T > & source,const bool moveToTheRight) |
|
public template<> INLINE void multiply (const std::vector< std::vector< T > > & left,const std::vector< std::vector< T > > & right,std::vector< std::vector< T > > & result) |
|
public template<> INLINE void multiply (const std::vector< std::vector< T > > & left,const std::vector< T > & right,std::vector< T > & result) |
|
public template<> INLINE void multiply (const std::vector< T > & left,const std::vector< T > & right,T & result) |
Calculate vector-vector multiplication. |
public template<> INLINE void multiplyElementWise (const std::vector< std::vector< T > > & left,const std::vector< std::vector< T > > & right,std::vector< std::vector< T > > & result) |
|
public template<> INLINE void multiplyElementWise (const std::vector< T > & left,const std::vector< T > & right,std::vector< T > & result) |
|
public template<> INLINE void multiplyComplexElementWise (const std::vector< std::vector< T > > & left,const std::vector< std::vector< T > > & right,std::vector< std::vector< T > > & result) |
#### Parameters |
public template<> INLINE std::string complexIntoString (const std::vector< T > complexValue) |
#### Parameters |
public template<> INLINE void conjugate (std::vector< std::vector< T > > & complexVector) |
#### Parameters |
public template<> INLINE void fft (std::vector< std::vector< T > > & complexVector) |
#### Parameters |
public template<> INLINE void ifft (std::vector< std::vector< T > > & complexVector) |
#### Parameters |
public INLINE std::chrono::high_resolution_clock::time_point time () |
Returns current time point. |
public INLINE std::chrono::system_clock::time_point systemTime () |
Returns current time point. |
public INLINE double duration (const std::chrono::high_resolution_clock::time_point start,const std::chrono::high_resolution_clock::time_point finish,const std::string scale) |
|
public INLINE double duration (const std::chrono::high_resolution_clock::time_point start,const std::string scale) |
|
public INLINE void printDuration (const std::chrono::high_resolution_clock::time_point start,const std::chrono::high_resolution_clock::time_point finish,const std::string scale,const std::size_t count) |
|
public INLINE void printDuration (const std::chrono::high_resolution_clock::time_point start,const std::string scale,const std::size_t count) |
|
public INLINE std::string getDateAndTime (std::chrono::system_clock::time_point timePoint) |
Get date and time. |
public INLINE std::string getDate (std::chrono::system_clock::time_point timePoint) |
Get date. |
public INLINE std::string getTime (std::chrono::system_clock::time_point timePoint) |
Get time. |
public INLINE std::string parseParameter (const char * input,const std::string name) |
|
public template<> INLINE void assignFromVectorByIntervalCondition (T & value,const T parameter,const std::vector< std::vector< T > > intervals) |
#### Parameters |
public template<> INLINE void assignFromVectorByIntervalCondition (T & firstValue,T & secondValue,const T parameter,const std::vector< std::vector< T > > intervals) |
#### Parameters |
public INLINE bool assignBooleanParameter (const char * input,const std::string name,bool & value) |
|
public INLINE bool assignCharParameter (const char * input,const std::string name,char & value) |
|
public INLINE bool assignStringParameter (const char * input,const std::string name,std::string & value) |
|
public template<> INLINE bool assignParameter (const char * input,const std::string name,T & value) |
#### Parameters |
public INLINE bool assignAbsDoubleParameter (const char * input,const std::string name,double & value) |
|
public template<> INLINE bool assignByCheckingParameter (const char * input,const std::string parameter,T & value,const T supposed) |
#### Parameters |
public INLINE void clearScreen () |
|
public INLINE void setLocale (const std::string locale) |
|
public INLINE void showProgressBar (double progress,const int screenWidth) |
|
public INLINE void printLine (const std::string line,const int screenWidth) |
|
public template<> INLINE void parseFileInMatrix (const std::string filename,const char separator,std::vector< std::vector< T > > & matrix) |
#### Parameters |
public template<> INLINE void parseFileInVector (const std::string filename,const char separator,std::vector< T > & vector) |
#### Parameters |
public INLINE void parseFileIntoString (const std::string filename,std::string & content) |
#### Exceptions |
public template<> INLINE void accumulateFileInMatrix (const std::string filename,const char separator,std::vector< std::vector< T > > & matrix) |
#### Parameters |
public template<> INLINE void accumulateFileInVector (const std::string filename,const char separator,std::vector< T > & vector,const bool checkForNaN) |
#### Parameters |
public template<> INLINE void printMatrix (const std::vector< std::vector< T > > & matrix,const bool transpose,const int precision) |
#### Parameters |
public template<> INLINE void printVector (const std::vector< T > & vector,const int precision) |
#### Parameters |
public template<> INLINE void print (const std::vector< std::vector< T > > & matrix,const bool transpose,const int precision) |
#### Parameters |
public template<> INLINE void print (const std::vector< T > & vector,const int precision) |
#### Parameters |
public template<> INLINE void print (const T value,const std::string name) |
#### Parameters |
public static std::string black ("\30m") |
Terminal color code for black. |
public static std::string red ("\31m") |
Terminal color code for red. |
public static std::string green ("\32m") |
Terminal color code for green. |
public static std::string yellow ("\33m") |
Terminal color code for yellow. |
public static std::string blue ("\34m") |
Terminal color code for blue. |
public static std::string magenta ("\35m") |
Terminal color code for magenta. |
public static std::string cyan ("\36m") |
Terminal color code for cyan. |
public static std::string white ("\37m") |
Terminal color code for white. |
public static std::string bold ("\1m") |
Terminal style code for bold. |
public static std::string underline ("\4m") |
Terminal style code for underline. |
public static std::string reset ("\0m") |
Terminal code to reset special formatting. |
public template<> INLINE void printStyle (const T income,const std::string style) |
#### Parameters |
public template<> INLINE void printBlack (const T income) |
#### Parameters |
public template<> INLINE void printRed (const T income) |
#### Parameters |
public template<> INLINE void printGreen (const T income) |
#### Parameters |
public template<> INLINE void printYellow (const T income) |
#### Parameters |
public template<> INLINE void printBlue (const T income) |
#### Parameters |
public template<> INLINE void printMagenta (const T income) |
#### Parameters |
public template<> INLINE void printCyan (const T income) |
#### Parameters |
public template<> INLINE void printWhite (const T income) |
#### Parameters |
public template<> INLINE void printBold (const T income) |
#### Parameters |
public template<> INLINE void printUnderline (const T income) |
#### Parameters |
public INLINE void printAllStyles () |
|
public INLINE void clearStyles () |
|
public template<> INLINE void saveMatrix (const std::string filename,const std::vector< std::vector< T > > & matrix,std::string comment,const bool transpose,std::string type,std::string delimiter,const std::size_t tokenWidth) |
#### Parameters |
public template<> INLINE void saveVector (const std::string filename,const std::vector< T > & vector,std::string comment,std::string type,std::string delimiter) |
#### Parameters |
public INLINE void saveLine (const std::string filename,const std::string line,std::string comment) |
#### Exceptions |
public template<> INLINE void save (const std::string filename,const std::vector< std::vector< T > > & matrix,std::string comment) |
|
public template<> INLINE void save (const std::string filename,const std::vector< T > & vector,std::string comment) |
|
public template<> INLINE void save (const std::string filename,const std::string line,std::string comment) |
|
public INLINE void saveLog (const std::string filename,std::string log,const bool timestamp,const std::string stampSeparator) |
#### Exceptions |
public INLINE void saveLog (const std::string filename,std::vector< std::string > & logs,const bool timestamp,const std::string stampSeparator) |
#### Exceptions |
public template<> INLINE bool loadA3R (const std::string filename,std::vector< std::vector< T > > & positions,double & radius) |
#### Parameters |
public template<> INLINE bool saveA3R (const std::string filename,const std::vector< std::vector< T > > & positions,const double radius) |
#### Parameters |
public template<> INLINE void loadXYZ (const std::string filename,std::vector< std::vector< T > > & matrix) |
#### Parameters |
public template<> INLINE void saveXYZ (const std::string filename,const std::vector< std::vector< T > > & matrix,const std::vector< T > & tones,std::string elementName) |
#### Parameters |
public template<> INLINE void saveXYZ (const std::string filename,const std::vector< std::vector< T > > & matrix,std::string elementName) |
#### Parameters |
public INLINE bool folderExists (const std::string name) |
Check if folder exists. |
public INLINE std::size_t countLinesInFile (const std::string filename,const std::string token) |
|
public INLINE std::vector< std::string > listFilesWithExtension (std::string path,const std::string extension,const std::string prefix,const bool addPathToFileNames) |
|
public INLINE std::string execute (const std::string command) |
public
INLINE
std::string
getVersion
()
Get version of the library.
This function returns version of the AiLibrary (we use SemVer)
Version as a string
See also: https://semver.org
Converts input into a string.
This function converts your variable into std::string using std::ostringstream
T
Any printable type
value
Your variable to convert
std::string copy of your input
Checks if a string begins with a substring.
This function checks if a string begins with a substring
-
text
Your string to test -
prefix
Your substring
True if string begins with a substring, false otherwise
Checks if a string ends with a substring.
This function checks if a string ends with a substring
-
text
Your string to test -
suffix
Your substring
True if string ends with a substring, false otherwise
Checks if a string contains a substring.
This function checks if a string contains a substring
-
text
Your string to test -
substring
Your substring
True if string contains a substring, false otherwise
public
INLINE
std::string
replace
(std::string text,const std::string & substring,const std::string & replacement)
Replaces all occurrences of a substring in a copy of the initial string with your text.
This function replaces all occurrences of a substring in a string with your text and return the result. Initial string stays the same
-
text
Your string to modify -
substring
Your substring to find in the string -
replacement
Replacement for all the substring occurrences
Modified copy of the initial string
public
INLINE
void
applyReplace
(std::string & text,const std::string & substring,const std::string & replacement)
Modifies your string by replacing all occurrences of a substring string with your text.
This function replaces all occurrences of a substring in a string with your text (modifies the initial string)
-
text
Your string to modify -
substring
Your substring to find in the string -
replacement
Replacement for all the substring occurrences
Checks if a char string is equal to a std::string.
This function compares a char string with a std::string
-
charString
Your char string to compare -
string1
Your std::string to compare
True if strings are equal, false otherwise
public
INLINE
std::string
toUpperCase
(std::string input)
Convert a string to upper case.
This function converts the given string to upper case and returns the result
input
String to convert
Uppercase string
public
INLINE
std::string
toLowerCase
(std::string input)
Convert a string to lower case.
This function converts the given string to lower case and returns the result
input
String to convert
Lowercase string
public template<>
INLINE
std::string
prependNumber
(const T value,const std::size_t symbolsBeforePoint,const char symbolToPrepend)
Returns ID starting from zero or the specified value.
This function returns ID (increases it at each call) starting from zero or the specified non-negative value
value
Optional. The non-negative value to which the counter should be reset. Zero by default
Counter value
Returns a string containing the word "Marker" and its ID.
This function returns a string containing the word "marker" and its ID (increases it at each call). ID specified in the same way as in the function counter()
value
Optional. The non-negative value to which the counter should be reset. Zero by default
Marker string
public
INLINE
void
printMarker
(const std::size_t value)
Calls marker() and prints result to stdout.
This function calls marker() and prints result to stdout
value
Optional. The non-negative value to which the counter should be reset. Zero by default
Returns signum of the value.
This function returns signum of the number value (usign copysign())
T
A number type
value
The number to which signum is applied
-1 for negative values, +1 for positive, 0 for zero
Returns minimum of two values.
This function compares two values and returns a minimum
T
A number type
-
a
First number -
b
Second number
Minimum of two values
Returns maximum of two values.
This function compares two values and returns a maximum
T
A number type
-
a
First number -
b
Second number
Maximum of two values
Returns minimum of vector values.
This function compares vector values using min() and returns a minimum
T
A number type
input
Vector to search for a minimum value
Minimum of vector values
Returns maximum of vector values.
This function compares vector values using max() and returns a maximum
T
A number type
input
Vector to search for a maximum value
Maximum of vector values
Returns minimum of matrix values.
This function compares matrix values using min() and returns a minimum
T
A number type
input
Matrix to search for a minimum value
Minimum of matrix values
Returns maximum of matrix values.
This function compares matrix values using max() and returns a maximum
T
A number type
input
Matrix to search for a maximum value
Maximum of matrix values
Checks if number is square.
This function checks if number is square
T
A number type
value
Number to test
True if number is a square, false otherwise
Checks if matrix is square.
This function checks if matrix is square
T
A number type
matrix
Matrix to test
True if matrix is square, false otherwise
public template<>
INLINE
void
generateRandomVector
(std::vector< T > & vector,const std::size_t length,const T min,const T max)
public template<>
INLINE
void
generateRandomMatrix
(std::vector< std::vector< T > > & matrix,const std::size_t xSize,const std::size_t ySize,const T min,const T max)
Fill matrix with random values.
This function fills the matrix of given sizes with random values using std::random_device and generateRandomVector()
T
A number type
-
matrix
Matrix to fill -
xSize
Required length of the matrix -
ySize
Required height of the matrix -
min
Lower limit of generated values, no limitation by default -
max
Upper limit of generated values, no limitation by default
public template<>
INLINE
void
generateRandomMatrix
(std::vector< std::vector< T > > & matrix,const std::size_t size,const T min,const T max)
Fill matrix with random values.
This function fills the square matrix of given sizes with random values using std::random_device and generateRandomVector()
T
A number type
-
matrix
Matrix to fill -
size
Required size of the square matrix -
min
Lower limit of generated values, no limitation by default -
max
Upper limit of generated values, no limitation by default
public template<>
void
rotateMatrix
(std::vector< std::vector< T > > & matrix,const bool rotateClockwise)
Rotate square matrix.
This function rotates the square matrix 90 degrees clockwise or anticlockwise
T
Any copiable type
-
matrix
Matrix to rotate -
rotateClockwise
Optional. If true, rotate clockwise. Otherwise, rotate anticlockwise (default)
public template<>
INLINE
void
inverseMatrix
(std::vector< std::vector< T > > matrix,std::vector< std::vector< T > > & inverse)
public template<>
INLINE
void
inverseMatrix
(std::vector< std::vector< T > > & matrix)
public template<>
INLINE
void
translateMatrixIntoVector
(std::vector< std::vector< T > > & matrix,std::vector< T > & vector)
Elongates matrix into a vector.
This function converts the matrix into a vector, writing each row one after another in a line
T
A number type
-
matrix
Matrix to tranform -
vector
Vector to store the result
public template<>
INLINE
void
translateVectorIntoSquareMatrix
(std::vector< T > & vector,std::vector< std::vector< T > > & matrix)
Transform vector into a square matrix (if possible)
This function converts the vector into a matrix, if possible. Otherwise, an exception will be thrown at runtime
T
A number type
-
vector
Vector to tranform -
matrix
Matrix to store the result
std::runtime_error
Ifmatrix
is not square
public template<>
INLINE
void
generateCirculantMatrix
(std::vector< std::vector< T > > & matrix,std::vector< T > & source,const bool moveToTheRight)
public template<>
INLINE
void
multiply
(const std::vector< std::vector< T > > & left,const std::vector< std::vector< T > > & right,std::vector< std::vector< T > > & result)
public template<>
INLINE
void
multiply
(const std::vector< std::vector< T > > & left,const std::vector< T > & right,std::vector< T > & result)
public template<>
INLINE
void
multiply
(const std::vector< T > & left,const std::vector< T > & right,T & result)
Calculate vector-vector multiplication.
This function calculates vector-vector multiplication
T
A number type
-
left
Left vector to multiply -
right
Right vector to multiply -
result
Variable to store result
std::runtime_error
If input sizes are inappropriate
public template<>
INLINE
void
multiplyElementWise
(const std::vector< std::vector< T > > & left,const std::vector< std::vector< T > > & right,std::vector< std::vector< T > > & result)
public template<>
INLINE
void
multiplyElementWise
(const std::vector< T > & left,const std::vector< T > & right,std::vector< T > & result)
public template<>
INLINE
void
multiplyComplexElementWise
(const std::vector< std::vector< T > > & left,const std::vector< std::vector< T > > & right,std::vector< std::vector< T > > & result)
T
A number type
public template<>
INLINE
std::string
complexIntoString
(const std::vector< T > complexValue)
T
A number type
T
A number type
T
A number type
T
A number type
Returns current time point.
This function returns current time point using std::chrono
std::chrono::high_resolution_clock entity
public
INLINE
std::chrono::system_clock::time_point
systemTime
()
Returns current time point.
This function returns current time point using std::chrono
std::chrono::system_clock entity
public
INLINE
double
duration
(const std::chrono::high_resolution_clock::time_point start,const std::chrono::high_resolution_clock::time_point finish,const std::string scale)
public
INLINE
double
duration
(const std::chrono::high_resolution_clock::time_point start,const std::string scale)
public
INLINE
void
printDuration
(const std::chrono::high_resolution_clock::time_point start,const std::chrono::high_resolution_clock::time_point finish,const std::string scale,const std::size_t count)
public
INLINE
void
printDuration
(const std::chrono::high_resolution_clock::time_point start,const std::string scale,const std::size_t count)
public
INLINE
std::string
getDateAndTime
(std::chrono::system_clock::time_point timePoint)
Get date and time.
This function converts the given moment to std::string containing the passed date and time
timePoint
Optional. The moment on the system clock to be converted, the current time by default
std::string with date and time in the format yyyy.mm.dd HH:MM:SS
Get date.
This function converts the given moment to std::string containing the passed date
timePoint
Optional. The moment on the system clock to be converted, the current time by default
std::string with date in the format yyyy.mm.dd
Get time.
This function converts the given moment to std::string containing the passed time
timePoint
Optional. The moment on the system clock to be converted, the current time by default
std::string with date time in the format HH:MM:SS
public
INLINE
std::string
parseParameter
(const char * input,const std::string name)
public template<>
INLINE
void
assignFromVectorByIntervalCondition
(T & value,const T parameter,const std::vector< std::vector< T > > intervals)
T
Any comparable type
public template<>
INLINE
void
assignFromVectorByIntervalCondition
(T & firstValue,T & secondValue,const T parameter,const std::vector< std::vector< T > > intervals)
T
Any comparable type
public
INLINE
bool
assignBooleanParameter
(const char * input,const std::string name,bool & value)
public
INLINE
bool
assignCharParameter
(const char * input,const std::string name,char & value)
public
INLINE
bool
assignStringParameter
(const char * input,const std::string name,std::string & value)
public template<>
INLINE
bool
assignParameter
(const char * input,const std::string name,T & value)
T
Any printable type
public
INLINE
bool
assignAbsDoubleParameter
(const char * input,const std::string name,double & value)
public template<>
INLINE
bool
assignByCheckingParameter
(const char * input,const std::string parameter,T & value,const T supposed)
T
Any type
public
INLINE
void
clearScreen
()
public
INLINE
void
showProgressBar
(double progress,const int screenWidth)
public template<>
INLINE
void
parseFileInMatrix
(const std::string filename,const char separator,std::vector< std::vector< T > > & matrix)
T
Any printable type
std::runtime_error
If file could not be open
public template<>
INLINE
void
parseFileInVector
(const std::string filename,const char separator,std::vector< T > & vector)
T
Any printable type
std::runtime_error
If file could not be open
public
INLINE
void
parseFileIntoString
(const std::string filename,std::string & content)
std::runtime_error
If file could not be open
public template<>
INLINE
void
accumulateFileInMatrix
(const std::string filename,const char separator,std::vector< std::vector< T > > & matrix)
T
A number type
public template<>
INLINE
void
accumulateFileInVector
(const std::string filename,const char separator,std::vector< T > & vector,const bool checkForNaN)
T
A number type
public template<>
INLINE
void
printMatrix
(const std::vector< std::vector< T > > & matrix,const bool transpose,const int precision)
T
Any printable type
public template<>
INLINE
void
printVector
(const std::vector< T > & vector,const int precision)
T
Any printable type
public template<>
INLINE
void
print
(const std::vector< std::vector< T > > & matrix,const bool transpose,const int precision)
T
Any printable type
T
Any printable type
T
Any printable type
public static std::string
black
("\30m")
Terminal color code for black.
This terminal control sequences sets black font color
public static std::string
red
("\31m")
Terminal color code for red.
This terminal control sequences sets red font color
public static std::string
green
("\32m")
Terminal color code for green.
This terminal control sequences sets green font color
public static std::string
yellow
("\33m")
Terminal color code for yellow.
This terminal control sequences sets yellow font color
public static std::string
blue
("\34m")
Terminal color code for blue.
This terminal control sequences sets blue font color
public static std::string
magenta
("\35m")
Terminal color code for magenta.
This terminal control sequences sets magenta font color
public static std::string
cyan
("\36m")
Terminal color code for cyan.
This terminal control sequences sets cyan font color
public static std::string
white
("\37m")
Terminal color code for white.
This terminal control sequences sets white font color
public static std::string
bold
("\1m")
Terminal style code for bold.
This terminal control sequences sets bold font style
public static std::string
underline
("\4m")
Terminal style code for underline.
This terminal control sequences sets underline font style
public static std::string
reset
("\0m")
Terminal code to reset special formatting.
This terminal control sequences resets font to the default state
public template<>
INLINE
void
printStyle
(const T income,const std::string style)
T
Any printable type
public template<>
INLINE
void
printBlack
(const T income)
T
Any printable type
T
Any printable type
public template<>
INLINE
void
printGreen
(const T income)
T
Any printable type
public template<>
INLINE
void
printYellow
(const T income)
T
Any printable type
T
Any printable type
public template<>
INLINE
void
printMagenta
(const T income)
T
Any printable type
T
Any printable type
public template<>
INLINE
void
printWhite
(const T income)
T
Any printable type
T
Any printable type
public template<>
INLINE
void
printUnderline
(const T income)
T
Any printable type
public
INLINE
void
printAllStyles
()
public
INLINE
void
clearStyles
()
public template<>
INLINE
void
saveMatrix
(const std::string filename,const std::vector< std::vector< T > > & matrix,std::string comment,const bool transpose,std::string type,std::string delimiter,const std::size_t tokenWidth)
T
Any printable type
std::runtime_error
If file could not be open
public template<>
INLINE
void
saveVector
(const std::string filename,const std::vector< T > & vector,std::string comment,std::string type,std::string delimiter)
T
Any printable type
std::runtime_error
If file could not be open
std::runtime_error
If file could not be open
public template<>
INLINE
void
save
(const std::string filename,const std::vector< std::vector< T > > & matrix,std::string comment)
public template<>
INLINE
void
save
(const std::string filename,const std::vector< T > & vector,std::string comment)
public template<>
INLINE
void
save
(const std::string filename,const std::string line,std::string comment)
public
INLINE
void
saveLog
(const std::string filename,std::string log,const bool timestamp,const std::string stampSeparator)
std::runtime_error
If file could not be open
public
INLINE
void
saveLog
(const std::string filename,std::vector< std::string > & logs,const bool timestamp,const std::string stampSeparator)
std::runtime_error
If file could not be open
public template<>
INLINE
bool
loadA3R
(const std::string filename,std::vector< std::vector< T > > & positions,double & radius)
T
A number type
std::runtime_error
If file could not be open
public template<>
INLINE
bool
saveA3R
(const std::string filename,const std::vector< std::vector< T > > & positions,const double radius)
T
A number type
std::runtime_error
If file could not be open
public template<>
INLINE
void
loadXYZ
(const std::string filename,std::vector< std::vector< T > > & matrix)
T
Any printable type
std::runtime_error
If file could not be open
See also: https://en.wikipedia.org/wiki/XYZ_file_format
public template<>
INLINE
void
saveXYZ
(const std::string filename,const std::vector< std::vector< T > > & matrix,const std::vector< T > & tones,std::string elementName)
T
A number type
std::runtime_error
If file could not be open
public template<>
INLINE
void
saveXYZ
(const std::string filename,const std::vector< std::vector< T > > & matrix,std::string elementName)
T
Any printable type
public
INLINE
bool
folderExists
(const std::string name)
Check if folder exists.
This function checks if the given directory actually exists
name
Path to the folder
True if folder exists, false otherwise
public
INLINE
std::size_t
countLinesInFile
(const std::string filename,const std::string token)
public
INLINE
std::vector< std::string >
listFilesWithExtension
(std::string path,const std::string extension,const std::string prefix,const bool addPathToFileNames)
Generated by Moxygen