This module contains several common functionalities needed for
G+Smo, for instance point iterators and combinatorial iterators.
|
void | capitalize (std::string &str) |
| Capitalize string in situ.
|
|
bool | ends_with (const std::string &haystack, const std::string &needle) |
| Checks if a string haystack ends with the string needle.
|
|
template<class T > |
gsMatrix< T > | gsPointGrid (gsVector< T > const &a, gsVector< T > const &b, gsVector< unsigned > const &np) |
| Construct a Cartesian grid of uniform points in a hypercube, using np[i] points in direction i.
|
|
std::string | returnCapitalized (const std::string &str) |
| Capitalize string.
|
|
bool | starts_with (const std::string &haystack, const std::string &needle) |
| Checks if a string haystack begins with the string needle.
|
|
void | string_replace (std::string &str, const std::string &oldStr, const std::string &newStr) |
| Replaces appearance of oldStr with newStr inside the string str.
|
|
template<typename C > |
std::string | to_string (const C &value) |
| Converts value to string, assuming "operator<<" defined on C.
|
|
◆ gsPointGrid()
Construct a Cartesian grid of uniform points in a hypercube, using np[i] points in direction i.
The hypercube is defined by its lower corner \(a = (a_1,\ldots,a_d)\) and the upper corner \(b = (b_1,\ldots,b_d)\), i.e., the hypercube is \( \mathsf{X}_{i=1}^d [a_i,b_i] \).
- Parameters
-
a | gsVector of length d, lower corner of the hypercube: \(a = (a_1,\ldots,a_d)\) |
b | gsVector of length d, upper corner of the hypercube: \(b = (b_1,\ldots,b_d)\) |
np | gsVector of length d, indicating number of grid points in each coordinate direction |
- Returns
- gsMatrix with size \( d \times \prod_{i=1}^d np[i]\).