this is the grouped documentation of global objects not part of any specific class.
More...
|
|
#define | LONG_LONG_MAX 9223372036854775807LL |
| | Redefinition of the LONG_LONG_MAX macro in case a specific compiler does not implement it. The largest number that fits in the long long type.
|
| |
|
| static void | fp::json_dump (std::string const &file_name, const Json &data) |
| | Simple wrapper function around Json objects built in dump() method.
|
| |
| static Json | fp::json_read (std::string file_name) |
| | Simple wrapper function that reads the content of a text file into a json object.
|
| |
| template<typename T > |
| static bool | fp::is_member (std::vector< T > const &v, T const &el) |
| | Convenient wrapper around std::find, which only works for std::vectors.
|
| |
|
| static constexpr auto | fp::VERY_LARGE_NUMBER_ = static_cast<Index>(LONG_LONG_MAX) |
| | Literal for a very large integral number.
|
| |
|
static constexpr int | fp::BOND_DONATION_CUTOFF = 4 |
| | a node needs to have more than the cutoff number of bonds to be allowed to donate one
|
| |
this is the grouped documentation of global objects not part of any specific class.
◆ json_dump()
| static void fp::json_dump |
( |
std::string const & | file_name, |
|
|
const Json & | data ) |
|
inlinestatic |
Simple wrapper function around Json objects built in dump() method.
- Parameters
-
| file_name | File name or a string containing the path and the file name. |
| data | json data object that is supposed to be stored. |
◆ json_read()
| static Json fp::json_read |
( |
std::string | file_name | ) |
|
|
inlinestatic |
Simple wrapper function that reads the content of a text file into a json object.
The file name onb the disk needs to end in '.json' for this function to work.
- Parameters
-
| file_name | File name or a string containing the path and the file name. |
- Returns
- Json object that was parsed from the provided file.
- Warning
- This function will stream any file into the json object. If the provided file is not a valid json file this will cause runtime errors.
◆ is_member()
template<typename T >
| static bool fp::is_member |
( |
std::vector< T > const & | v, |
|
|
T const & | el ) |
|
static |
Convenient wrapper around std::find, which only works for std::vectors.
- Template Parameters
-
| T | type of the vector elements. |
- Parameters
-
| v | std::vector in which we want to search. |
| el | the value of the element that we want to check for. |
- Returns
- The function returns
true if el is contained in vector v (at least once), otherwise it returns false.
◆ VERY_LARGE_NUMBER_
Literal for a very large integral number.
This number will be used for the default instantiation of variables/ data members that hold indices. This is done to avoid instantiation with 0, which could also be a valid index. This way, one can differentiate between unintentionally default instantiated value and a proper value of an index. This will also mean that the use of such improperly instantiated indexer variables will cause an easier-to-identify error during runtime.
- See also
- fp::BondFlipData fp::Neighbors fp::Triangulation::two_common_neighbours(Index, Index) const fp::Triangulation::two_common_neighbour_positions(Index, Index) const