From e8c52f319412ec847b8adbf102e1e9cd2aa37a8c Mon Sep 17 00:00:00 2001 From: Thomas Hahn Date: Mon, 3 Jun 2024 12:23:05 -0400 Subject: [PATCH] Fix typos in docs --- c++/nda/_impl_basic_array_view_common.hpp | 4 ++-- c++/nda/arithmetic.hpp | 16 ++++++++-------- c++/nda/clef/auto_assign.hpp | 2 +- c++/nda/clef/auto_assign_subscript.hpp | 2 +- c++/nda/clef/io.hpp | 2 +- c++/nda/clef/operation.hpp | 2 +- c++/nda/concepts.hpp | 2 +- c++/nda/device.hpp | 2 +- c++/nda/iterators.hpp | 12 ++++++------ c++/nda/lapack/gelss_worker.hpp | 6 +++--- c++/nda/lapack/getrf.hpp | 2 +- c++/nda/lapack/ungqr.hpp | 2 +- c++/nda/layout/policies.hpp | 4 ++-- c++/nda/layout/rect_str.hpp | 8 ++++---- c++/nda/layout_transforms.hpp | 2 +- c++/nda/linalg/matmul.hpp | 2 +- c++/nda/map.hpp | 2 +- c++/nda/mem/address_space.hpp | 2 +- c++/nda/stdutil/array.hpp | 2 +- c++/nda/sym_grp.hpp | 2 +- c++/nda/traits.hpp | 2 +- doc/ChangeLog.md | 8 ++++---- doc/groups.dox | 8 ++++---- 23 files changed, 48 insertions(+), 48 deletions(-) diff --git a/c++/nda/_impl_basic_array_view_common.hpp b/c++/nda/_impl_basic_array_view_common.hpp index 357701bd..63183fec 100644 --- a/c++/nda/_impl_basic_array_view_common.hpp +++ b/c++/nda/_impl_basic_array_view_common.hpp @@ -110,7 +110,7 @@ /** * @brief Get a range that generates all valid index tuples. - * @return An `itertools::mulitplied` range that can be used to iterate over all valid index tuples. + * @return An `itertools::multiplied` range that can be used to iterate over all valid index tuples. */ [[nodiscard]] auto indices() const noexcept { return itertools::product_range(shape()); } @@ -227,7 +227,7 @@ FORCEINLINE static decltype(auto) call(Self &&self, Ts const &...idxs) noexcept( * @brief Function call operator to access the view/array. * * @details Depending on the type of the calling object and the given arguments, this function call does the following: - * - If any of the arugments is lazy, an nda::clef::expr with the nda::clef::tags::function tag is returned. + * - If any of the arguments is lazy, an nda::clef::expr with the nda::clef::tags::function tag is returned. * - If no arguments are given, a full view of the calling object is returned: * - If the calling object itself or its value type is const, a view with a const value type is returned. * - Otherwise, a view with a non-const value type is returned. diff --git a/c++/nda/arithmetic.hpp b/c++/nda/arithmetic.hpp index 179f81a8..9c061f6f 100644 --- a/c++/nda/arithmetic.hpp +++ b/c++/nda/arithmetic.hpp @@ -96,7 +96,7 @@ namespace nda { * @details A lazy binary expression contains a two operands and a binary operation. It fulfills the nda::Array * concept and can therefore be used in any other expression or function that expects an nda::Array type. * - * The supported binary operations are addition ('+'), substraction ('-'), multiplication ('*') and division ('/'). + * The supported binary operations are addition ('+'), subtraction ('-'), multiplication ('*') and division ('/'). * * @tparam OP Char representing the unary operation. * @param L nda::ArrayOrScalar type of left hand side. @@ -116,7 +116,7 @@ namespace nda { /// Decay type of the right hand side operand. using R_t = std::decay_t; - // FIXME : we should use is_scalar_for_v but the trait needs work to accomodate scalar L or R + // FIXME : we should use is_scalar_for_v but the trait needs work to accommodate scalar L or R /// Constexpr variable that is true if the left hand side operand is a scalar. static constexpr bool l_is_scalar = nda::is_scalar_v; @@ -259,7 +259,7 @@ namespace nda { /** * @brief Subscript operator. * - * @details Simply fowards the argument to the function call operator. + * @details Simply forwards the argument to the function call operator. * * @tparam Arg Type of the argument. * @param arg Subscript argument. @@ -400,7 +400,7 @@ namespace nda { * - 'M' * 'M': Matrix-matrix multiplication calls nda::matmul and returns the result. * - 'M' * 'V': Matrix-vector multiplication calls nda::matvecmul and returns the result. * - * Obvious restrictons on the ranks and shapes of the input arrays apply. + * Obvious restrictions on the ranks and shapes of the input arrays apply. * * @tparam L nda::Array type of left hand side. * @tparam R nda::Array type of right hand side. @@ -471,13 +471,13 @@ namespace nda { } /** - * @brief Divison operator for two nda::Array types. + * @brief Division operator for two nda::Array types. * * @details The input arrays must have one of the following algebras: * - 'A' / 'A': Elementwise division of two arrays returns a lazy nda::expr object. * - 'M' / 'M': Multiplies the lhs matrix with the inverse of the rhs matrix and returns the result. * - * Obvious restrictons on the ranks and shapes of the input arrays apply. + * Obvious restrictions on the ranks and shapes of the input arrays apply. * * @tparam L nda::Array type of left hand side. * @tparam R nda::Array type of right hand side. @@ -511,7 +511,7 @@ namespace nda { } /** - * @brief Divsion operator for an nda::Array and an nda::Scalar. + * @brief Division operator for an nda::Array and an nda::Scalar. * * @details It performs lazy elementwise division. * @@ -537,7 +537,7 @@ namespace nda { * @tparam A nda::Array type. * @param s nda::Scalar left hand side operand. * @param a nda::Array right hand side operand. - * @return Lazy binary expression for the divsion operation (multiplication in case of a matrix). + * @return Lazy binary expression for the division operation (multiplication in case of a matrix). */ template Array auto operator/(S &&s, A &&a) { // NOLINT (S&& is mandatory for proper concept Array <: typename to work) diff --git a/c++/nda/clef/auto_assign.hpp b/c++/nda/clef/auto_assign.hpp index 0babf000..8e79dbfd 100644 --- a/c++/nda/clef/auto_assign.hpp +++ b/c++/nda/clef/auto_assign.hpp @@ -122,7 +122,7 @@ namespace nda::clef { clef_auto_assign(std::get<0>(ex.childs), make_function(std::forward(rhs), placeholder()...)); } - // Delete functions to avoid non-sensical cases, e.g. f(x_ + y_) << RHS. + // Delete functions to avoid nonsensical cases, e.g. f(x_ + y_) << RHS. template void operator<<(expr &&ex, RHS &&rhs) = delete; // NOLINT (no forwarding required here) template diff --git a/c++/nda/clef/auto_assign_subscript.hpp b/c++/nda/clef/auto_assign_subscript.hpp index d9823115..78ae3284 100644 --- a/c++/nda/clef/auto_assign_subscript.hpp +++ b/c++/nda/clef/auto_assign_subscript.hpp @@ -126,7 +126,7 @@ namespace nda::clef { clef_auto_assign_subscript(std::get<0>(ex.childs), make_function(std::forward(rhs), placeholder()...)); } - // Delete functions to avoid non-sensical cases, e.g. f[x_ + y_] = RHS. + // Delete functions to avoid nonsensical cases, e.g. f[x_ + y_] = RHS. template void operator<<(expr &&ex, RHS &&rhs) = delete; // NOLINT (no forwarding required here) template diff --git a/c++/nda/clef/io.hpp b/c++/nda/clef/io.hpp index 2d1ef315..81fa1d64 100644 --- a/c++/nda/clef/io.hpp +++ b/c++/nda/clef/io.hpp @@ -234,7 +234,7 @@ namespace nda::clef { } /** - * @brief Print an nda::clef::make_fun_impl obejct to std::ostream. + * @brief Print an nda::clef::make_fun_impl object to std::ostream. * * @tparam Expr Type of the expression. * @tparam Is Integer labels of the placeholders in the expression. diff --git a/c++/nda/clef/operation.hpp b/c++/nda/clef/operation.hpp index 7a38f688..e428d3d3 100644 --- a/c++/nda/clef/operation.hpp +++ b/c++/nda/clef/operation.hpp @@ -63,7 +63,7 @@ namespace nda::clef { template struct operation; - /// Specializtion of nda::clef::operation for nda::clef::tags::terminal. + /// Specialization of nda::clef::operation for nda::clef::tags::terminal. template <> struct operation { /** diff --git a/c++/nda/concepts.hpp b/c++/nda/concepts.hpp index b4b54f44..9976578e 100644 --- a/c++/nda/concepts.hpp +++ b/c++/nda/concepts.hpp @@ -112,7 +112,7 @@ namespace nda { concept StdArrayOfLong = detail::is_std_array_of_long_v; /** - * @brief Check if a given type is either an arthmetic or complex type. + * @brief Check if a given type is either an arithmetic or complex type. * @tparam S Type to check. */ template diff --git a/c++/nda/device.hpp b/c++/nda/device.hpp index c36d0282..df5e7f9f 100644 --- a/c++/nda/device.hpp +++ b/c++/nda/device.hpp @@ -136,7 +136,7 @@ namespace nda { #else -/// Trigger a compilation error everytime the nda::device_error_check function is called. +/// Trigger a compilation error every time the nda::device_error_check function is called. #define device_error_check(ARG1, ARG2) compile_error_no_gpu() /// Constexpr variable that is true if the project is configured with GPU support. diff --git a/c++/nda/iterators.hpp b/c++/nda/iterators.hpp index 916dbf01..ca82bafe 100644 --- a/c++/nda/iterators.hpp +++ b/c++/nda/iterators.hpp @@ -39,7 +39,7 @@ namespace nda { // N-dimensional rectangular grid iterator in C traversal order. template class grid_iterator { - // Stride or number of elements to skip when incresing the iterator in the current dimension. + // Stride or number of elements to skip when increasing the iterator in the current dimension. long stri = 0; // Position of the iterator in the current dimension. @@ -117,7 +117,7 @@ namespace nda { // Specialization of nda::grid_iterator for 1-dimensional grids. template <> class grid_iterator<1> { - // Stride or number of elements to skip when incresing the iterator. + // Stride or number of elements to skip when increasing the iterator. long stri = 0; // Position of the iterator. @@ -169,7 +169,7 @@ namespace nda { return *this; } - // Compund assignment addition operator increments the offset by n times the stride and the position by n. + // Compound assignment addition operator increments the offset by n times the stride and the position by n. grid_iterator &operator+=(std::ptrdiff_t n) { offset += n * stri; pos += n; @@ -179,7 +179,7 @@ namespace nda { // Binary addition of a grid iterator and an integer. [[nodiscard]] friend grid_iterator operator+(grid_iterator it, std::ptrdiff_t n) { return it += n; } - // Binaray subtraction of two grid iterators. + // Binary subtraction of two grid iterators. [[nodiscard]] friend std::ptrdiff_t operator-(grid_iterator const &lhs, grid_iterator const &rhs) { return lhs.pos - rhs.pos; } // True if the position of the left hand side iterator is less than the position of the right hand side iterator, @@ -433,7 +433,7 @@ namespace nda { [[nodiscard]] bool operator!=(array_iterator const &other) const { return (!operator==(other)); } /** - * @brief Compund assignment addition operator increments the iterator a given number of times. + * @brief Compound assignment addition operator increments the iterator a given number of times. * * @param n Number of times to increment the iterator. * @return Reference to the current iterator. @@ -444,7 +444,7 @@ namespace nda { } /** - * @brief Compund assignment subtraction operator decrements the iterator a given number of times. + * @brief Compound assignment subtraction operator decrements the iterator a given number of times. * * @param n Number of times to decrement the iterator. * @return Reference to the current iterator. diff --git a/c++/nda/lapack/gelss_worker.hpp b/c++/nda/lapack/gelss_worker.hpp index 8cc4ea77..c00baadd 100644 --- a/c++/nda/lapack/gelss_worker.hpp +++ b/c++/nda/lapack/gelss_worker.hpp @@ -107,7 +107,7 @@ namespace nda::lapack { gelss_worker(matrix A_) : M(A_.extent(0)), N(A_.extent(1)), A(std::move(A_)), s_vec(std::min(M, N)) { if (N > M) NDA_RUNTIME_ERROR << "Error in nda::lapack::gelss_worker: Matrix A cannot have more columns than rows"; - // intialize matrices + // initialize matrices matrix A_FL{A}; matrix U(M, M); matrix VH(N, N); @@ -220,8 +220,8 @@ namespace nda::lapack { // We reshape the Matrix into a dim=4 array and swap the two innermost indices - // FIXME OLD CODE SUPRRESS AFTER PORTING - // FIXME We would like to write: tranpose(reshape(idx_map, {l[0], N, d, d}), {0, 1, 3, 2}) + // FIXME OLD CODE SURPRESS AFTER PORTING + // FIXME We would like to write: transpose(reshape(idx_map, {l[0], N, d, d}), {0, 1, 3, 2}) // auto idx_map_inner_transpose = array_view::layout_t{{l[0], N, d, d}, {s[0], d * d * s[1], s[1], d * s[1]}}; // Deep copy //array arr_dag = conj(array_const_view{idx_map_inner_transpose, M.storage()}); diff --git a/c++/nda/lapack/getrf.hpp b/c++/nda/lapack/getrf.hpp index 4279e8f9..43f4676e 100644 --- a/c++/nda/lapack/getrf.hpp +++ b/c++/nda/lapack/getrf.hpp @@ -65,7 +65,7 @@ namespace nda::lapack { auto dm = std::min(a.extent(0), a.extent(1)); if (ipiv.size() < dm) ipiv.resize(dm); // ipiv needs to be a regular array? - // must be lapack compatiblem + // must be lapack compatible EXPECTS(a.indexmap().min_stride() == 1); EXPECTS(ipiv.indexmap().min_stride() == 1); diff --git a/c++/nda/lapack/ungqr.hpp b/c++/nda/lapack/ungqr.hpp index 103d4359..687aeb69 100644 --- a/c++/nda/lapack/ungqr.hpp +++ b/c++/nda/lapack/ungqr.hpp @@ -50,7 +50,7 @@ namespace nda::lapack { * * @tparam A nda::MemoryMatrix with complex value type. * @tparam TAU nda::MemoryVector with complex value type. - * @param a Input/output matrix. On entry, the i-th column must contain the vector whichdefines the elementary + * @param a Input/output matrix. On entry, the i-th column must contain the vector which defines the elementary * reflector \f$ H(i) \; , i = 1,2,...,K \f$, as returned by `geqrf` in the first k columns. On exit, the m-by-n * matrix \f$ \mathbf{Q} \f$. * @param tau Input vector. `tau(i)` must contain the scalar factor of the elementary reflector \f$ \mathbf{H}(i) \f$, diff --git a/c++/nda/layout/policies.hpp b/c++/nda/layout/policies.hpp index 5de2b90a..03020cb1 100644 --- a/c++/nda/layout/policies.hpp +++ b/c++/nda/layout/policies.hpp @@ -41,7 +41,7 @@ namespace nda { /// @endcond /** - * @brief Contigous layout policy with C-order (row-major order). + * @brief Contiguous layout policy with C-order (row-major order). * @details The last dimension varies the fastest, the first dimension varies the slowest. */ struct C_layout { @@ -57,7 +57,7 @@ namespace nda { }; /** - * @brief Contigous layout policy with Fortran-order (column-major order). + * @brief Contiguous layout policy with Fortran-order (column-major order). * @details The first dimension varies the fastest, the last dimension varies the slowest. */ struct F_layout { diff --git a/c++/nda/layout/rect_str.hpp b/c++/nda/layout/rect_str.hpp index 8439ed23..7e726469 100644 --- a/c++/nda/layout/rect_str.hpp +++ b/c++/nda/layout/rect_str.hpp @@ -264,7 +264,7 @@ namespace nda { // type of sliced nda::rect_str using new_rect_str_t = typename detail::rect_str_from_base>::type; - // if the string indices have not been intialized, simply return a new nda::rect_str with the sliced nda::idx_map + // if the string indices have not been initialized, simply return a new nda::rect_str with the sliced nda::idx_map if (not s_indices) return std::make_pair(offset, new_rect_str_t{idxm2}); // otherwise slice the string indices as well (not optimized but simple) @@ -336,7 +336,7 @@ namespace nda { // type of transposed nda::rect_str using new_rect_str_t = typename detail::rect_str_from_base>::type; - // if the string indices have not been intialized, simply return the transposed nda::rect_str + // if the string indices have not been initialized, simply return the transposed nda::rect_str if (not s_indices) return new_rect_str_t{idxm2}; // otherwise transpose the string indices as well @@ -361,7 +361,7 @@ namespace nda { /// @endcond /** - * @brief Contigous layout policy with C-order (row-major order) and possible string indices. + * @brief Contiguous layout policy with C-order (row-major order) and possible string indices. * @details The last dimension varies the fastest, the first dimension varies the slowest. */ struct C_layout_str { @@ -377,7 +377,7 @@ namespace nda { }; /** - * @brief Contigous layout policy with Fortran-order (column-major order) and possible string indices. + * @brief Contiguous layout policy with Fortran-order (column-major order) and possible string indices. * @details The first dimension varies the fastest, the last dimension varies the slowest. */ struct F_layout_str { diff --git a/c++/nda/layout_transforms.hpp b/c++/nda/layout_transforms.hpp index 7b8db0b3..12332631 100644 --- a/c++/nda/layout_transforms.hpp +++ b/c++/nda/layout_transforms.hpp @@ -92,7 +92,7 @@ namespace nda { /** * @brief Reshape an nda::basic_array or nda::basic_array_view. * - * @details The input array/view is assumed to be contiguous and in C- or Fortan-order and the size of the reshaped + * @details The input array/view is assumed to be contiguous and in C- or Fortran-order and the size of the reshaped * array/view must be the same as the input. * * It calls nda::map_layout_transform with the given shape. diff --git a/c++/nda/linalg/matmul.hpp b/c++/nda/linalg/matmul.hpp index 7c80c6d8..f16ac8b2 100644 --- a/c++/nda/linalg/matmul.hpp +++ b/c++/nda/linalg/matmul.hpp @@ -156,7 +156,7 @@ namespace nda { // check address space compatibility static constexpr auto L_adr_spc = mem::get_addr_space; static constexpr auto R_adr_spc = mem::get_addr_space; - static_assert(L_adr_spc == R_adr_spc, "Error in nda::matvecmul: Matrix-vector product requires arguments with same adress spaces"); + static_assert(L_adr_spc == R_adr_spc, "Error in nda::matvecmul: Matrix-vector product requires arguments with same address spaces"); static_assert(L_adr_spc != mem::None); // get resulting value type and vector type diff --git a/c++/nda/map.hpp b/c++/nda/map.hpp index a43a6dea..553875d5 100644 --- a/c++/nda/map.hpp +++ b/c++/nda/map.hpp @@ -71,7 +71,7 @@ namespace nda { /** * @brief A lazy function call expression on arrays/views. * - * @details The lazy expression call fullfils the nda::Array concept and can therefore be assigned to other + * @details The lazy expression call fulfils the nda::Array concept and can therefore be assigned to other * nda::basic_array or nda::basic_array_view objects. For example: * * @code{.cpp} diff --git a/c++/nda/mem/address_space.hpp b/c++/nda/mem/address_space.hpp index 509e91c0..eb29a06a 100644 --- a/c++/nda/mem/address_space.hpp +++ b/c++/nda/mem/address_space.hpp @@ -49,7 +49,7 @@ namespace nda::mem { */ /** - * @brief Enum providing idientifiers for the different memory address spaces. + * @brief Enum providing identifiers for the different memory address spaces. * * @details The following address spaces are available: * - `None`: No address space. diff --git a/c++/nda/stdutil/array.hpp b/c++/nda/stdutil/array.hpp index e1231785..7c1571e4 100644 --- a/c++/nda/stdutil/array.hpp +++ b/c++/nda/stdutil/array.hpp @@ -234,7 +234,7 @@ namespace nda::stdutil { * @tparam R Size of the input array. * @param a Input std::array. * @param x Element to prepend. - * @return A copy of the input array with the additonal element prepended at the front. + * @return A copy of the input array with the additional element prepended at the front. */ template constexpr std::array front_append(std::array const &a, U const &x) { diff --git a/c++/nda/sym_grp.hpp b/c++/nda/sym_grp.hpp index 76e1a576..67ae22e8 100644 --- a/c++/nda/sym_grp.hpp +++ b/c++/nda/sym_grp.hpp @@ -55,7 +55,7 @@ namespace nda { * @brief Multiplication operator for two operations. * * @details The sign flip (complex conjugation) operation is set to true in the resulting product iff one of the two - * (exlusive or!) input operations has the sign flip (complex conjugation) operation set to true. + * (exclusive or!) input operations has the sign flip (complex conjugation) operation set to true. * * @param rhs Right hand side operation. * @return The resulting operation. diff --git a/c++/nda/traits.hpp b/c++/nda/traits.hpp index 8b9bc201..3bf8adb4 100644 --- a/c++/nda/traits.hpp +++ b/c++/nda/traits.hpp @@ -281,7 +281,7 @@ namespace nda { * @brief Checks if a layout property has the `smallest_stride_is_one` property. * * @param lp nda::layout_prop_e to check. - * @return True if it has the `smalles_stride_is_one` property, false otherwise. + * @return True if it has the `smallest_stride_is_one` property, false otherwise. */ inline constexpr bool has_smallest_stride_is_one(layout_prop_e lp) { return uint64_t(lp) & uint64_t(layout_prop_e::smallest_stride_is_one); } diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index 5741219f..7764cf0e 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -90,7 +90,7 @@ Find below an itemized list of changes in this release. * Enable slicing with ranges that have negative steps + test * Make basic_array(idx_map, &&mem_handle) constructor public * Allow temporaries in calls to lapack wrapping functions -* Generlize nda_lapack test to run both double and complex versions +* Generalize nda_lapack test to run both double and complex versions * Add blas::has_C_layout and blas::has_F_layout traits and use for cleanup * Generalize nda_blas and nda_cublas test for various value_t and layout combinations * In make_regular do not invoke copy of regular arrays @@ -120,9 +120,9 @@ Find below an itemized list of changes in this release. * Remove REQUIRES macro and use 'requires' * Enable slicing also for h5_write operations, assume existing dataset * Make pivot array const in getri signature -* Minor cleanup in nda/h5.hpp template contraints and doc +* Minor cleanup in nda/h5.hpp template constraints and doc * Allow to pass dimensions as integers to factory functions basic_array::ones/zeros/rand -* Add the 1d array factory nda::arange mimicing numpy arange + test +* Add the 1d array factory nda::arange mimicking numpy arange + test * Allow bound checks also for array.extent(int) function * Configure and install nda/version.hpp header * Synchronize clang-tidy config file with app4triqs @@ -159,7 +159,7 @@ Find below an itemized list of changes in this release. ### Concepts * Use C++20 concepts to constrain various generic functions and classes * Introduce concepts: Array, MemoryArray, Matrix, Vector, Handle -* Various concept related simplififications and refactorings +* Various concept related simplifications and refactoring ### GPU Support * Introduce GPU support for arrays and views diff --git a/doc/groups.dox b/doc/groups.dox index 3ae30079..d5de24e2 100644 --- a/doc/groups.dox +++ b/doc/groups.dox @@ -35,7 +35,7 @@ * - nda::expr_unary: A lazy unary expression for negation. * * These lazy expressions all satisfy the nda::Array concept and can therefore be used to assign to or construct - * nda::basic_array and nda::basic_array_view objects. Another way to evalute lazy expressions is with + * nda::basic_array and nda::basic_array_view objects. Another way to evaluate lazy expressions is with * nda::make_regular: * * @code{.cpp} @@ -49,7 +49,7 @@ * // evaluate the lazy expression by constructing a new array * nda::array C = ex; * - * // evalute the lazy expression using nda::make_regular + * // evaluate the lazy expression using nda::make_regular * auto D = nda::make_regular(ex); * @endcode * @@ -209,7 +209,7 @@ * - nda::expr_call: A lazy function call expression. * * This lazy function call expression satisfies the nda::Array concept and can therefore be used to assign to or - * construct nda::basic_array and nda::basic_array_view objects. Another way to evalute lazy expressions is with + * construct nda::basic_array and nda::basic_array_view objects. Another way to evaluate lazy expressions is with * nda::make_regular: * * @code{.cpp} @@ -223,7 +223,7 @@ * // evaluate the lazy expression by constructing a new array * nda::array C = ex; * - * // evalute the lazy expression using nda::make_regular + * // evaluate the lazy expression using nda::make_regular * auto D = nda::make_regular(ex); * @endcode *