Skip to content

Commit

Permalink
Fix doc with bad order
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Edwards committed Sep 26, 2024
1 parent f0b6240 commit bc770d7
Show file tree
Hide file tree
Showing 18 changed files with 272 additions and 276 deletions.
5 changes: 3 additions & 2 deletions etc/check_doc_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@


def all_cpp_files(start):
files = set()
files = []

def dive(path):
for entry in listdir(path):
candidate = os.path.join(path, entry)
if isfile(candidate) and splitext(entry)[1] == ".hpp":
files.add(candidate)
files.append(candidate)
elif not isfile(candidate):
dive(candidate)

dive(start)
files.sort()
return files


Expand Down
78 changes: 39 additions & 39 deletions include/libsemigroups/action.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,12 @@ namespace libsemigroups {
//!
//! \returns The size of the action, a value of type \c size_t.
//!
//! \exceptions
//! \no_libsemigroups_except
//!
//! \complexity
//! The time complexity is \f$O(mn)\f$ where \f$m\f$ is the total number of
//! points in the orbit and \f$n\f$ is the number of generators.
//!
//! \exceptions
//! \no_libsemigroups_except
[[nodiscard]] size_t size() {
run();
return _orb.size();
Expand All @@ -562,11 +562,11 @@ namespace libsemigroups {
//! \returns
//! A value of type \c size_t.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
[[nodiscard]] size_t current_size() const noexcept {
return _orb.size();
}
Expand All @@ -580,11 +580,11 @@ namespace libsemigroups {
//! \returns
//! A const iterator to the first point.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
[[nodiscard]] const_iterator cbegin() const noexcept {
return const_iterator(_orb.cbegin());
}
Expand All @@ -599,15 +599,15 @@ namespace libsemigroups {
//!
//! Returns a range object containing the current points in the
//! action.
// TODO(1) add a reference to the ranges page when it exists
//!
//! \returns A range object.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
// TODO(1) add a reference to the ranges page when it exists
[[nodiscard]] auto range() const noexcept {
return rx::iterator_range(_orb.cbegin(), _orb.cend())
| rx::transform([this](auto const& pt) {
Expand All @@ -625,11 +625,11 @@ namespace libsemigroups {
//! \returns
//! A const iterator to one past the end.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
[[nodiscard]] const_iterator cend() const noexcept {
return const_iterator(_orb.cend());
}
Expand All @@ -652,11 +652,11 @@ namespace libsemigroups {
//! \returns
//! A value of type \c bool.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
[[nodiscard]] bool cache_scc_multipliers() const noexcept {
return _options._cache_scc_multipliers;
}
Expand All @@ -672,11 +672,11 @@ namespace libsemigroups {
//! \returns
//! A reference to `*this`.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
Action& cache_scc_multipliers(bool val) noexcept {
_options._cache_scc_multipliers = val;
return *this;
Expand All @@ -693,13 +693,13 @@ namespace libsemigroups {
//!
//! \returns An element of type \ref element_type.
//!
//! \throws LibsemigroupsException if there are no generators yet added
//! or the index \p pos is out of range.
//!
//! \complexity
//! At most \f$O(mn)\f$ where \f$m\f$ is the complexity of multiplying
//! elements of type \ref element_type and \f$n\f$ is the size of the fully
//! enumerated orbit.
//!
//! \throws LibsemigroupsException if there are no generators yet added
//! or the index \p pos is out of range.
[[nodiscard]] element_type multiplier_from_scc_root(index_type pos) {
return multiplier_private<true>(
_multipliers_from_scc_root, _scc.spanning_forest(), pos);
Expand All @@ -716,13 +716,13 @@ namespace libsemigroups {
//!
//! \returns An element of type \ref element_type.
//!
//! \throws LibsemigroupsException if there are no generators yet added
//! or the index \p pos is out of range.
//!
//! \complexity
//! At most \f$O(mn)\f$ where \f$m\f$ is the complexity of multiplying
//! elements of type \ref element_type and \f$n\f$ is the size of the fully
//! enumerated orbit.
//!
//! \throws LibsemigroupsException if there are no generators yet added
//! or the index \p pos is out of range.
[[nodiscard]] element_type multiplier_to_scc_root(index_type pos) {
return multiplier_private<false>(
_multipliers_to_scc_root, _scc.reverse_spanning_forest(), pos);
Expand All @@ -738,13 +738,13 @@ namespace libsemigroups {
//!
//! \returns A value of type \ref const_reference_point_type.
//!
//! \throws LibsemigroupsException if the point \p x does not belong to
//! the action.
//!
//! \complexity
//! At most \f$O(mn)\f$ where \f$m\f$ is the complexity of multiplying
//! elements of type \ref element_type and \f$n\f$ is the size of the fully
//! enumerated orbit.
//!
//! \throws LibsemigroupsException if the point \p x does not belong to
//! the action.
[[nodiscard]] const_reference_point_type
root_of_scc(const_reference_point_type x) {
// TODO(2) this could be a helper
Expand All @@ -762,12 +762,12 @@ namespace libsemigroups {
//!
//! \returns A value of type \ref const_reference_point_type.
//!
//! \throws LibsemigroupsException if the index \p pos is out of range.
//!
//! \complexity
//! At most \f$O(mn)\f$ where \f$m\f$ is the complexity of multiplying
//! elements of type \ref element_type and \f$n\f$ is the size of the fully
//! enumerated orbit.
//!
//! \throws LibsemigroupsException if the index \p pos is out of range.
[[nodiscard]] const_reference_point_type root_of_scc(index_type pos) {
return this->to_external_const(_orb[_scc.root_of(pos)]);
}
Expand All @@ -776,13 +776,13 @@ namespace libsemigroups {
//!
//! \returns A const reference to a WordGraph<uint32_t>.
//!
//! \exceptions
//! \no_libsemigroups_except
//!
//! \complexity
//! At most \f$O(mn)\f$ where \f$m\f$ is the complexity of multiplying
//! elements of type \ref element_type and \f$n\f$ is the size of the fully
//! enumerated orbit.
//!
//! \exceptions
//! \no_libsemigroups_except
[[nodiscard]] WordGraph<uint32_t> const& word_graph() {
run();
return _graph;
Expand All @@ -796,13 +796,13 @@ namespace libsemigroups {
//!
//! \returns A const reference to a Gabow object.
//!
//! \exceptions
//! \no_libsemigroups_except
//!
//! \complexity
//! At most \f$O(mn)\f$ where \f$m\f$ is the complexity of multiplying
//! elements of type \ref element_type and \f$n\f$ is the size of the fully
//! enumerated orbit.
//!
//! \exceptions
//! \no_libsemigroups_except
[[nodiscard]] Gabow<uint32_t> const& scc() {
run();
return _scc;
Expand Down
28 changes: 14 additions & 14 deletions include/libsemigroups/bipart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,10 +868,10 @@ namespace libsemigroups {
//! * partition the set \f$\{-n, \ldots, -1, 1, \ldots, n\}\f$
//! for some positive integer \f$n\f$.
//!
//! \warning None of these conditions is checked by the constructor.
//!
//! \param blocks the partition.
//!
//! \warning None of these conditions is checked by the constructor.
//!
//! \sa libsemigroups::validate(Bipartition const&).
Bipartition(std::initializer_list<std::vector<int32_t>> const& blocks);

Expand Down Expand Up @@ -1170,12 +1170,12 @@ namespace libsemigroups {
//! \param y the second bipartition to multiply
//! \param thread_id the index of the calling thread (defaults to \c 0)
//!
//! \complexity
//! Quadratic in `x.degree()`.
//!
//! \exceptions
//! \no_libsemigroups_except
//!
//! \complexity
//! Quadratic in `x.degree()`.
//!
//! \warning
//! If different threads call this function concurrently with the same
//! parameter \p thread_id, then bad things will happen.
Expand Down Expand Up @@ -1350,11 +1350,11 @@ namespace libsemigroups {
//!
//! \param n the number of blocks.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
void set_number_of_blocks(size_t n) noexcept;

//! \brief Set the number of left blocks.
Expand All @@ -1364,11 +1364,11 @@ namespace libsemigroups {
//!
//! \param n the number of blocks.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
void set_number_of_left_blocks(size_t n) noexcept;

//! \brief Set the rank.
Expand All @@ -1378,11 +1378,11 @@ namespace libsemigroups {
//!
//! \param n the rank.
//!
//! \complexity
//! Constant.
//!
//! \exceptions
//! \noexcept
//!
//! \complexity
//! Constant.
void set_rank(size_t n) noexcept;

//! \brief Return a const iterator pointing to the first transverse
Expand Down
Loading

0 comments on commit bc770d7

Please sign in to comment.