|
scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
|
#include "./percentage.hpp"#include "../util/types.hpp"#include "boost/algorithm/string.hpp"#include <cmath>#include <iostream>#include <sstream>#include <string>
Go to the source code of this file.
Namespaces | |
| namespace | scifir |
| The namespace scifir contains all scifir-units, excepting the string literals, which are outside. | |
Functions | |
| string | scifir::to_string (const percentage &x) |
| Returns a string representation of percentage x. | |
| bool | scifir::is_percentage (const string &init_percentage) |
| Checks if a string is an initialization string of percentage. | |
| scifir::scalar_unit | operator* (const scifir::scalar_unit &x, const scifir::percentage &y) |
| Multiplies the percentage with the scalar_unit x to create a percentage of that scalar_unit. | |
| scifir::scalar_unit | operator/ (const scifir::scalar_unit &x, const scifir::percentage &y) |
| Multiplies the scalar_unit x by the percentage equal to the inverse of percentage y. | |
| bool | operator== (const scifir::percentage &x, const scifir::percentage &y) |
| Returns true if the value of percentage x is equal to the value of percentage y. | |
| bool | operator!= (const scifir::percentage &x, const scifir::percentage &y) |
| Returns true if the value of percentage x is not equal to the value of percentage y. | |
| bool | operator< (const scifir::percentage &x, const scifir::percentage &y) |
| Returns true if the value of percentage x is lower than the value of percentage y. | |
| bool | operator> (const scifir::percentage &x, const scifir::percentage &y) |
| Returns true if the value of percentage x is greather than the value of percentage y. | |
| bool | operator<= (const scifir::percentage &x, const scifir::percentage &y) |
| Returns true if the value of percentage x is lower or equal than the value of percentage y. | |
| bool | operator>= (const scifir::percentage &x, const scifir::percentage &y) |
| Returns true if the value of percentage x is equal or greather than the value of percentage y. | |
| bool | operator== (const scifir::percentage &x, const string &init_percentage) |
| Returns true if x and the percentage constructed with init_percentage are equal. | |
| bool | operator!= (const scifir::percentage &x, const string &init_percentage) |
| Returns true if x and the percentage constructed with init_percentage are different. | |
| bool | operator== (const string &init_percentage, const scifir::percentage &x) |
| Returns true if x and the percentage constructed with init_percentage are equal. | |
| bool | operator!= (const string &init_percentage, const scifir::percentage &x) |
| Returns true if x and the percentage constructed with init_percentage are different. | |
| void | operator+= (string &x, const scifir::percentage &y) |
| Concatenates the string representation of percentage y to the string x. | |
| string | operator+ (const string &x, const scifir::percentage &y) |
| Concatenates x with the string representation of percentage y. | |
| string | operator+ (const scifir::percentage &y, const string &x) |
| Concatenates x with the string representation of percentage y. | |
| ostream & | operator<< (ostream &os, const scifir::percentage &x) |
| Adds the string representation of the percentage x to an output stream os. | |
| istream & | operator>> (istream &is, scifir::percentage &x) |
| Allows that an istream initializes by string a percentage x. | |
| bool operator!= | ( | const scifir::percentage & | x, |
| const scifir::percentage & | y | ||
| ) |
Returns true if the value of percentage x is not equal to the value of percentage y.
Definition at line 560 of file percentage.cpp.
| bool operator!= | ( | const scifir::percentage & | x, |
| const string & | init_percentage | ||
| ) |
Returns true if x and the percentage constructed with init_percentage are different.
Definition at line 605 of file percentage.cpp.
| bool operator!= | ( | const string & | init_percentage, |
| const scifir::percentage & | x | ||
| ) |
Returns true if x and the percentage constructed with init_percentage are different.
Definition at line 616 of file percentage.cpp.
| scifir::scalar_unit operator* | ( | const scifir::scalar_unit & | x, |
| const scifir::percentage & | y | ||
| ) |
Multiplies the percentage with the scalar_unit x to create a percentage of that scalar_unit.
Definition at line 538 of file percentage.cpp.
| string operator+ | ( | const scifir::percentage & | y, |
| const string & | x | ||
| ) |
Concatenates x with the string representation of percentage y.
Definition at line 636 of file percentage.cpp.
| string operator+ | ( | const string & | x, |
| const scifir::percentage & | y | ||
| ) |
Concatenates x with the string representation of percentage y.
Definition at line 628 of file percentage.cpp.
| void operator+= | ( | string & | x, |
| const scifir::percentage & | y | ||
| ) |
Concatenates the string representation of percentage y to the string x.
Definition at line 621 of file percentage.cpp.
| scifir::scalar_unit operator/ | ( | const scifir::scalar_unit & | x, |
| const scifir::percentage & | y | ||
| ) |
Multiplies the scalar_unit x by the percentage equal to the inverse of percentage y.
Definition at line 543 of file percentage.cpp.
| bool operator< | ( | const scifir::percentage & | x, |
| const scifir::percentage & | y | ||
| ) |
Returns true if the value of percentage x is lower than the value of percentage y.
Definition at line 565 of file percentage.cpp.
| ostream & operator<< | ( | ostream & | os, |
| const scifir::percentage & | x | ||
| ) |
Adds the string representation of the percentage x to an output stream os.
Definition at line 644 of file percentage.cpp.
| bool operator<= | ( | const scifir::percentage & | x, |
| const scifir::percentage & | y | ||
| ) |
Returns true if the value of percentage x is lower or equal than the value of percentage y.
Definition at line 589 of file percentage.cpp.
| bool operator== | ( | const scifir::percentage & | x, |
| const scifir::percentage & | y | ||
| ) |
Returns true if the value of percentage x is equal to the value of percentage y.
Definition at line 548 of file percentage.cpp.
| bool operator== | ( | const scifir::percentage & | x, |
| const string & | init_percentage | ||
| ) |
Returns true if x and the percentage constructed with init_percentage are equal.
Definition at line 599 of file percentage.cpp.
| bool operator== | ( | const string & | init_percentage, |
| const scifir::percentage & | x | ||
| ) |
Returns true if x and the percentage constructed with init_percentage are equal.
Definition at line 610 of file percentage.cpp.
| bool operator> | ( | const scifir::percentage & | x, |
| const scifir::percentage & | y | ||
| ) |
Returns true if the value of percentage x is greather than the value of percentage y.
Definition at line 577 of file percentage.cpp.
| bool operator>= | ( | const scifir::percentage & | x, |
| const scifir::percentage & | y | ||
| ) |
Returns true if the value of percentage x is equal or greather than the value of percentage y.
Definition at line 594 of file percentage.cpp.
| istream & operator>> | ( | istream & | is, |
| scifir::percentage & | x | ||
| ) |
Allows that an istream initializes by string a percentage x.
Definition at line 649 of file percentage.cpp.