- Fixed Doxygen Structure once more, this bug with sections appearing under the first subpage is becoming frustrating. Currently got it so everything appears under "Contents"

This commit is contained in:
2025-08-18 23:13:09 -04:00
parent 7cd38604a7
commit 4ff739d625
8 changed files with 103 additions and 21 deletions

View File

@@ -189,7 +189,7 @@ sudo dnf install doxygen graphviz
script in WSL, simply use the "bash" command in Command Prompt or PowerShell. The script will require
the build [dependencies](#dependencies) installed and configured to be available on the `PATH` environment variable.
Fore more details, [see this blog post](https://blogs.windows.com/windows-insider/2016/04/06/announcing-windows-10-insider-preview-build-14316/) for Windows Build 14316.
For more details, [see this blog post](https://blogs.windows.com/windows-insider/2016/04/06/announcing-windows-10-insider-preview-build-14316/) for Windows Build 14316.
Otherwise, follow the sequence of commands provided in the bash script.

View File

@@ -48,7 +48,7 @@ PROJECT_NAME = fennec
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER =
PROJECT_NUMBER = 1.0.2
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -944,7 +944,8 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = "/home/medusa/Documents/Work/Personal/fennec/include" \
"/home/medusa/Documents/Work/Personal/fennec/source"
"/home/medusa/Documents/Work/Personal/fennec/source" \
"/home/medusa/Documents/Work/Personal/fennec/README.md"
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

View File

@@ -944,7 +944,8 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = "@PROJECT_SOURCE_DIR@/include" \
"@PROJECT_SOURCE_DIR@/source"
"@PROJECT_SOURCE_DIR@/source" \
"@PROJECT_SOURCE_DIR@/README.md"
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

View File

@@ -43,6 +43,20 @@ namespace fennec
/// \brief Graph Data Structure, describes sets of arbitrarily connected nodes
///
/// \details
/// | Property | Value |
/// |:----------:|:----------:|
/// | stable | ⛔ |
/// | dynamic | ✅ |
/// | homogenous | ✅ |
/// | distinct | ⛔ |
/// | ordered | ⛔ |
/// | space | \f$O(N)\f$ |
/// | linear | ✅ |
/// | access | \f$O(1)\f$ |
/// | find | \f$O(1)\f$ |
/// | insertion | \f$O(1)\f$ |
/// | deletion | \f$O(N)\f$ |
///
/// Graphs contain nodes (sometimes called vertices) and connections. Graphs are either directed
/// or undirected. This structure allows the creation of both directed and undirected connections. As
/// far as what that means; a directed graph means that connections have direction, where there are connections
@@ -129,10 +143,12 @@ public:
return num_nodes() == 0;
}
// TODO: connected, disjoint
/// @}
// Access ==============================================================================================================
// Access ==============================================================================================================
/// \name Access
/// @{
@@ -157,22 +173,32 @@ public:
/// \brief Connection Access Operator
/// \param a The id of the first node
/// \param b The id of the second node
/// \returns A reference to the value stored in the connection
constexpr weight_t& operator[](size_t a, size_t b) {
/// \returns A pointer to the value stored in the connection, `nullptr` if not found
constexpr weight_t* operator[](size_t a, size_t b) {
if (empty()) {
return nullptr;
}
weight_t* it = _conn_map[a][b];
assertd(it, "Element not Found!");
return _conn_pool[*it];
if (it) {
return _conn_pool[*it];
}
return nullptr;
}
///
/// \brief Connection Const Access Operator
/// \param a The id of the first node
/// \param b The id of the second node
/// \returns A const-qualified reference to the value stored in the connection
constexpr const weight_t& operator[](size_t a, size_t b) const {
weight_t* it = _conn_map[a][b];
assertd(it, "Element not Found!");
return _conn_pool[*it];
/// \returns A const-qualified pointer to the value stored in the connection, `nullptr` if not found
constexpr const weight_t* operator[](size_t a, size_t b) const {
if (empty()) {
return nullptr;
}
const weight_t* it = _conn_map[a][b];
if (it) {
return _conn_pool[*it];
}
return nullptr;
}
///
@@ -181,6 +207,9 @@ public:
/// \returns A list containing all nodes `x` with connections from `node` to `x...`
list<size_t> outgoing(size_t node) {
list<size_t> res;
if (empty() || node >= _conn_map.size()) {
return res;
}
for (const auto& it : _conn_map[node]) {
res.push_back(it.first);
}
@@ -193,7 +222,10 @@ public:
/// \returns A list containing all nodes `x` with connections from `x...` to `node`
list<size_t> incoming(size_t node) {
list<size_t> res;
for (int n = 0; n < _conn_map.size(); ++n) {
if (empty() || node >= _conn_map.size()) {
return res;
}
for (size_t n = 0; n < _conn_map.size(); ++n) {
if (_conn_map[n][node]) {
res.push_back(n);
}
@@ -202,12 +234,14 @@ public:
}
///
/// \brief
/// \param node A list of all nodes `x` that have symmetric connections with `node`, i.e. `node` has a connection
/// both to and from `x...`
/// \brief Getter for a list of nodes `x` that `node` has a connection to and from `x...`
/// \param node The id of the node
/// \returns A list containing all nodes `x` that have symmetric connections with `node`
list<size_t> symmetric(size_t node) {
list<size_t> res;
if (empty() || node >= _conn_map.size()) {
return res;
}
for (const auto& it : _conn_map[node]) {
if (_conn_map[it.first][node]) {
res.push_back(it.first);
@@ -216,8 +250,23 @@ public:
return res;
}
///
/// \brief Getter for a list of nodes `x` that `node` has a connection to and from `x...` and share the same weight
/// \param node The id of the node
/// \returns A list containing all nodes `x` that have symmetric connections with `node`
list<size_t> joined(size_t node) {
list<size_t> res;
if (empty() || node >= _conn_map.size()) {
return res;
}
for (const auto& it : _conn_map[node]) {
const auto* at = _conn_map[it.first][node];
if (at == &it.second) {
res.push_back(it.first);
}
}
return res;
}
/// @}

View File

@@ -258,7 +258,7 @@ private:
set_t _set;
template<typename...ArgsT>
set_t::iterator _find(ArgsT&&...args) {
set_t::iterator _find(ArgsT&&...args) const {
union U { // Hacky way of avoiding constructing the value, TODO: Check for warnings on other compilers
pair<KeyT, char[sizeof(ValueT)]> root;
pair<KeyT, ValueT> val;

View File

@@ -495,6 +495,8 @@ public:
/// \name Iteration
/// @{
///
/// \returns An iterator for all elements of the set in no particular order
constexpr iterator begin() const {
iterator it(this, 0);
if (not _alloc[it._i].value) {
@@ -503,6 +505,8 @@ public:
return it;
}
///
/// \returns An iterator representing the end of the set
constexpr iterator end() const {
return iterator(this, npos);
}

View File

@@ -441,6 +441,8 @@ public:
/// \name Iteration
/// @{
///
/// \returns An iterator for all elements of the set in no particular order
constexpr iterator begin() const {
iterator it(this, 0);
if (not _alloc[it._i].value) {
@@ -449,6 +451,8 @@ public:
return it;
}
///
/// \returns An iterator representing the end of the set
constexpr iterator end() const {
return iterator(this, npos);
}

View File

@@ -28,6 +28,29 @@
///
///
///
/// \page contents Contents
///
/// 1. \ref introduction "Introduction"
/// 1. \ref coding-standards "Coding Standards"
/// 2. \ref building-from-source "Building from Source"
/// 1. \ref building-from-terminal "Building from Terminal"
/// 1. \ref debian "Debian"
/// 2. \ref fedora-dnf "Fedora"
/// 2. \ref building-on-windows "Building on Windows"
/// 3. \ref running-the-test-suite "Running the Test Suite"
/// 4. \ref usage "Usage"
/// 1. \ref licensing "Licensing"
/// 5. \ref contribution "Contribution"
/// 6. \subpage libraries
/// 1. \ref fennec_lang "C++ Language Library"
/// 2. \ref fennec_math "Math Library"
/// 2. \ref fennec_memory "Memory Management Library"
/// 2. \ref fennec_containers "Containers Library"
///
/// \copyright Copyright © 2025 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))
///
///
/// \page libraries Libraries
///