Skip to content

Commit ccfb52f

Browse files
committed
flat_matrix doc
1 parent b9eac3f commit ccfb52f

2 files changed

Lines changed: 543 additions & 384 deletions

File tree

include/gl/types/flat_jagged_vector.hpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ class flat_jagged_vector {
319319
/// @param n_segments The number of segments to create.
320320
/// @param segment_size The initial size of each segment (default is 0).
321321
/// @post `size() == n_segments` and each segment is initialized with `segment_size` default-constructed elements.
322-
/// @exception std::bad_alloc May throw if memory allocation fails.
322+
/// @throws std::bad_alloc May throw if memory allocation fails.
323323
flat_jagged_vector(size_type n_segments, size_type segment_size = 0uz)
324324
: _data(n_segments * segment_size), _offsets(n_segments + 1uz) {
325325
for (size_type i = 0uz; i <= n_segments; i++)
@@ -329,7 +329,7 @@ class flat_jagged_vector {
329329
/// @brief Constructs a `flat_jagged_vector` from an initializer list of segments.
330330
/// @param ilist Initializer list of initializer lists, each representing a segment.
331331
/// @post `size() == ilist.size()` and `data_size()` equals the sum of all segment sizes.
332-
/// @exception std::bad_alloc May throw if memory allocation fails.
332+
/// @throws std::bad_alloc May throw if memory allocation fails.
333333
flat_jagged_vector(std::initializer_list<std::initializer_list<value_type>> ilist) {
334334
this->reserve_segments(ilist.size());
335335

@@ -350,7 +350,7 @@ class flat_jagged_vector {
350350
/// @tparam R A range type whose elements are input ranges of `value_type`.
351351
/// @param r The range of ranges to initialize from.
352352
/// @post `size()` equals the number of outer range elements; `data_size()` is the sum of all element counts.
353-
/// @exception std::bad_alloc May throw if memory allocation fails.
353+
/// @throws std::bad_alloc May throw if memory allocation fails.
354354
template <std::ranges::input_range R>
355355
requires(std::ranges::input_range<std::ranges::range_reference_t<R>> and std::convertible_to<std::ranges::range_reference_t<std::ranges::range_reference_t<R>>, value_type>)
356356
explicit flat_jagged_vector(R&& r) {
@@ -462,7 +462,7 @@ class flat_jagged_vector {
462462
/// @param n The new number of segments.
463463
/// @param r The range to initialize any newly appended segments with.
464464
/// @post `size() == n`
465-
/// @exception std::bad_alloc If memory allocation fails.
465+
/// @throws std::bad_alloc If memory allocation fails.
466466
///
467467
/// > [!WARNING] Iterator invalidation
468468
/// >
@@ -587,7 +587,7 @@ class flat_jagged_vector {
587587
/// @brief Returns the segment at the given index with bounds checking.
588588
/// @param seg The index of the segment.
589589
/// @return A subrange representing the segment at index `seg`.
590-
/// @exception std::out_of_range If `seg >= size()`.
590+
/// @throws std::out_of_range If `seg >= size()`.
591591
[[nodiscard]] segment_type at(size_type seg) {
592592
this->_check_range(seg);
593593
return (*this)[seg];
@@ -596,7 +596,7 @@ class flat_jagged_vector {
596596
/// @brief Returns a const segment at the given index with bounds checking.
597597
/// @param seg The index of the segment.
598598
/// @return A const subrange representing the segment at index `seg`.
599-
/// @exception std::out_of_range If `seg >= size()`.
599+
/// @throws std::out_of_range If `seg >= size()`.
600600
[[nodiscard]] const_segment_type at(size_type seg) const {
601601
this->_check_range(seg);
602602
return (*this)[seg];
@@ -606,7 +606,7 @@ class flat_jagged_vector {
606606
/// @param seg The segment number.
607607
/// @param pos The position within the segment.
608608
/// @return Reference to the element at the given segment and position.
609-
/// @exception std::out_of_range If `seg >= size()` or `pos >= segment_size(seg)`.
609+
/// @throws std::out_of_range If `seg >= size()` or `pos >= segment_size(seg)`.
610610
[[nodiscard]] reference at(size_type seg, size_type pos) {
611611
this->_check_range(seg);
612612
this->_check_segment_range(seg, pos);
@@ -617,7 +617,7 @@ class flat_jagged_vector {
617617
/// @param seg The segment number.
618618
/// @param pos The position within the segment.
619619
/// @return Const reference to the element at the given segment and position.
620-
/// @exception std::out_of_range If `seg >= size()` or `pos >= segment_size(seg)`.
620+
/// @throws std::out_of_range If `seg >= size()` or `pos >= segment_size(seg)`.
621621
[[nodiscard]] const_reference at(size_type seg, size_type pos) const {
622622
this->_check_range(seg);
623623
this->_check_segment_range(seg, pos);
@@ -929,7 +929,7 @@ class flat_jagged_vector {
929929
/// ### Postconditions
930930
/// 1. `size()` is incremented by 1
931931
/// 2. `data_size()` increases by the range size.
932-
/// @exception std::bad_alloc If memory allocation fails.
932+
/// @throws std::bad_alloc If memory allocation fails.
933933
///
934934
/// > [!INFO] Time complexity
935935
/// >
@@ -962,7 +962,7 @@ class flat_jagged_vector {
962962
/// @brief Appends a segment from an initializer list.
963963
/// @param ilist The initializer list to append as a segment.
964964
/// @post `size()` is incremented by 1; `data_size()` increases by the list size.
965-
/// @exception std::bad_alloc If memory allocation fails.
965+
/// @throws std::bad_alloc If memory allocation fails.
966966
///
967967
/// > [!INFO] Implementation
968968
/// >
@@ -1004,7 +1004,7 @@ class flat_jagged_vector {
10041004
/// ### Postconditions
10051005
/// 1. `size()` is incremented by 1
10061006
/// 2. Segments at and after `pos` are shifted and offsets are updated.
1007-
/// @exception std::bad_alloc If memory allocation fails.
1007+
/// @throws std::bad_alloc If memory allocation fails.
10081008
///
10091009
/// > [!INFO] Time complexity
10101010
/// >
@@ -1047,7 +1047,7 @@ class flat_jagged_vector {
10471047
/// @brief Inserts a segment from an initializer list at the specified position.
10481048
/// @param pos The position where the segment will be inserted (must satisfy `pos <= size()`).
10491049
/// @param ilist The initializer list to insert as a segment.
1050-
/// @exception std::bad_alloc If memory allocation fails.
1050+
/// @throws std::bad_alloc If memory allocation fails.
10511051
///
10521052
/// > [!INFO] Implementation
10531053
/// >
@@ -1092,7 +1092,7 @@ class flat_jagged_vector {
10921092
/// ### Postconditions
10931093
/// 1. The segment size increases by 1.
10941094
/// 2. `data_size()` increases by 1.
1095-
/// @exception std::bad_alloc If memory allocation fails.
1095+
/// @throws std::bad_alloc If memory allocation fails.
10961096
///
10971097
/// > [!INFO] Time complexity
10981098
/// >
@@ -1115,7 +1115,7 @@ class flat_jagged_vector {
11151115
/// ### Postconditions
11161116
/// 1. The segment size increases by 1.
11171117
/// 2. `data_size()` increases by 1.
1118-
/// @exception Any exception thrown by the `T` constructor, or std::bad_alloc.
1118+
/// @throws Any exception thrown by the `T` constructor, or std::bad_alloc.
11191119
///
11201120
/// > [!INFO] Time complexity
11211121
/// >
@@ -1159,7 +1159,7 @@ class flat_jagged_vector {
11591159
/// ### Postconditions
11601160
/// 1. The segment size increases by 1.
11611161
/// 2. `data_size()` increases by 1.
1162-
/// @exception std::bad_alloc If memory allocation fails.
1162+
/// @throws std::bad_alloc If memory allocation fails.
11631163
///
11641164
/// > [!INFO] Time complexity
11651165
/// >
@@ -1185,7 +1185,7 @@ class flat_jagged_vector {
11851185
/// ### Postconditions
11861186
/// 1. The segment size increases by 1.
11871187
/// 2. `data_size()` increases by 1.
1188-
/// @exception Any exception thrown by the `T` constructor, or std::bad_alloc.
1188+
/// @throws Any exception thrown by the `T` constructor, or std::bad_alloc.
11891189
///
11901190
/// > [!INFO] Time complexity
11911191
/// >
@@ -1231,7 +1231,7 @@ class flat_jagged_vector {
12311231
/// @param seg The segment number to resize.
12321232
/// @param n The new size for the segment.
12331233
/// @pre `seg < size()`
1234-
/// @exception std::bad_alloc If memory allocation fails during growth.
1234+
/// @throws std::bad_alloc If memory allocation fails during growth.
12351235
///
12361236
/// > [!INFO] Implementation
12371237
/// >
@@ -1250,7 +1250,7 @@ class flat_jagged_vector {
12501250
/// @param n The new size for the segment.
12511251
/// @param value The value to initialize new elements with.
12521252
/// @pre `seg < size()`
1253-
/// @exception std::bad_alloc If memory allocation fails during growth.
1253+
/// @throws std::bad_alloc If memory allocation fails during growth.
12541254
///
12551255
/// > [!INFO] Time complexity
12561256
/// >

0 commit comments

Comments
 (0)