Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
dd0f1eb
refactor(doxyfile): Refactor Doxyfile to standardize settings
lrleon Jan 28, 2026
4a4e122
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 3, 2026
8863f79
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 9, 2026
b3b795d
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 9, 2026
9e162e8
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 10, 2026
95914a2
Merge branches 'master' and 'master' of github.com:lrleon/Aleph-w
lrleon Feb 10, 2026
a0b3061
removed not needed loop
lrleon Feb 10, 2026
18097d2
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 11, 2026
fe7f669
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 11, 2026
4d0615d
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 20, 2026
82f7f17
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 23, 2026
ff3ccf6
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 26, 2026
4cf3b3e
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Feb 26, 2026
06db919
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 3, 2026
5ea000a
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 4, 2026
2ee4a4c
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 5, 2026
e7699e1
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 10, 2026
1a400ce
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 13, 2026
103338f
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 16, 2026
a681429
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 17, 2026
3c89181
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 19, 2026
febed27
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 21, 2026
259a80b
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 22, 2026
d0864db
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 28, 2026
32758b2
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Mar 29, 2026
42c8688
Merge branch 'master' of github.com:lrleon/Aleph-w
lrleon Apr 4, 2026
0ffa03f
refactor(docs): Improve documentation for algorithms
lrleon Apr 4, 2026
79b9a85
feat(compiler): Implement full compiler frontend support
lrleon Apr 12, 2026
b6fad39
refactor(compiler): Enhance compiler types and lexer/parser
lrleon Apr 13, 2026
3da4e9a
refactor(core): Improve compiler and utility code
lrleon Apr 13, 2026
3198758
fix(core): Refactor Gephi template version sort
lrleon Apr 13, 2026
9e7587f
refactor(core): Adjust Min_Cost_Matching header comments
lrleon Apr 14, 2026
b15f4fe
fix(core): Escape Ruby executable path in validator
lrleon Apr 14, 2026
4bc0778
fix(core): Refactor gephi executable name and path logic
lrleon Apr 14, 2026
75cfcb2
refactor: añadir atributo [[nodiscard]] y limpiar formato
lrleon Apr 15, 2026
34c05ce
feat(compiler): Add new High-level Intermediate Representation
lrleon Apr 15, 2026
8024306
feat(compiler): Implement full compiler toolchain
lrleon Apr 16, 2026
243b394
refactor(core): Update docs and tpl_scope header
lrleon Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ NamespaceIndentation: None
# Braces (Next-line indented: Custom style with IndentBraces: true)
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
Expand Down
2 changes: 1 addition & 1 deletion .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CodeRabbit Configuration for Aleph-w
# https://docs.coderabbit.ai/guides/configure-coderabbit

language: "en-US"
language: "es-ES"

reviews:
# Enable reviews on ALL branches, not just default
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/planarity_gephi_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ jobs:
f.write(f"asset_name={asset_name}\n")
PY

- name: Validate fixture with real Gephi binary
- name: Validate fixture and downloaded Gephi executable
shell: bash
env:
GEPHI_EXE: ${{ steps.install_gephi.outputs.gephi_exe }}
Expand All @@ -350,6 +350,7 @@ jobs:
import json
import os
import pathlib
import shlex
import subprocess
import sys

Expand All @@ -372,8 +373,8 @@ jobs:
"id": "nightly.real-gephi.smoke",
"os": "any",
"gephi_version": gephi_version,
"description": "Nightly real-Gephi smoke check using downloaded package.",
"cmd": f"\"{gephi_exe}\" --version",
"description": "Nightly downloaded Gephi executable availability probe.",
"cmd": f'ruby -e "path = ARGV.fetch(0); exit((File.file?(path) and File.executable?(path)) ? 0 : 1)" {shlex.quote(gephi_exe)}',
}
],
}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ EDGE_AS_NODE_STATUS.md
# AI agent config files
AGENTS.md
CLAUDE.md
GPT.md
DEEPSEEK.md
QWEN.md
KIWI.md
#GEMINI.md

# Temp scripts in root
Expand Down
40 changes: 13 additions & 27 deletions Bellman_Ford.H
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,29 @@
* directed graph. Unlike Dijkstra's algorithm, Bellman-Ford can handle
* graphs with negative edge weights and can detect negative-weight cycles.
*
* ## Algorithms Provided
*
* - **Standard Bellman-Ford**: O(V*E) time complexity
* - **SPFA (Shortest Path Faster Algorithm)**: Queue-based optimization
* that is often faster in practice on sparse graphs
*
* ## Key Features
*
* - Handles negative edge weights
* - Detects negative-weight cycles
* - Can return the negative cycle as a path
* - Supports both painted (in-place) and separate tree construction
*
* ## Complexity
*
* | Operation | Time | Space |
* |-----------|------|-------|
* | Standard | O(V*E) | O(V) |
* | SPFA (avg) | O(E) | O(V) |
* | SPFA (worst) | O(V*E) | O(V) |
*
* ## Usage Example
* | Algorithm | Time (avg) | Time (worst) | Space |
* |-----------|------------|--------------|-------|
* | Standard | O(V*E) | O(V*E) | O(V) |
* | SPFA | O(E) | O(V*E) | O(V) |
*
* ```cpp
* @par Example
* @code
* List_Digraph<Node, Arc> g;
* // ... build graph ...
* List_Digraph<Node, Arc>::Node * start = g.get_first_node();
*
* Bellman_Ford bf(g);
*
* Bellman_Ford<List_Digraph<Node, Arc>> bf(g);
*
* // Check for negative cycles and compute shortest paths
* if (bf.has_negative_cycle(start_node)) {
* // Check for negative cycles and compute shortest paths from 'start'
* if (bf.has_negative_cycle(start)) {
* Path<Graph> cycle = bf.build_negative_cycle();
* // handle negative cycle
* } else {
* // Use the shortest path tree
* // bf.is_painted() is true, Spanning_Tree bits are set
* }
* ```
* @endcode
*
* @see Dijkstra.H For graphs without negative weights (more efficient)
* @see Floyd_Warshall.H For all-pairs shortest paths
Expand Down
22 changes: 14 additions & 8 deletions Blossom.H
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,21 @@
* contracts them into single super-nodes to find augmenting paths that
* would otherwise be hidden.
*
* ## Problem solved
* Given an undirected graph@f$G=(V,E)@f$, find a matching@f$M@f$
* (a set of arcs with no shared endpoints) such that@f$|M|@f$is maximized.
* ## Complexity
*
* ## Highlights
* - Works on **general** (non-bipartite) undirected graphs.
* - Handles odd cycles through recursive blossom contraction and expansion.
* - Supports all Aleph-w graph representations through the generic interface.
* - Integrates with Aleph-w arc filters for selective matching.
* | Algorithm | Time | Space |
* |-----------|------|-------|
* | Edmonds-Blossom | O(V^3) | O(V + E) |
*
* @par Example
* @code
* List_Graph<Node, Arc> g;
* // ... add nodes and arcs ...
*
* DynDlist<List_Graph<Node, Arc>::Arc*> matching;
* size_t size = compute_maximum_cardinality_general_matching(g, matching);
* // matching now contains the arcs of an optimal matching
* @endcode
*
* @example blossom_example.cc
*
Expand Down
1 change: 1 addition & 0 deletions Blossom_Weighted.H
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
*
* @see Blossom.H For maximum-cardinality (unweighted) matching
* @ingroup Graphs
* @author Leandro Rabindranath León
*/

#ifndef BLOSSOM_WEIGHTED_H
Expand Down
42 changes: 27 additions & 15 deletions Branch_And_Bound.H
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
* @author Leandro Rabindranath León
*/

# ifndef BRANCH_AND_BOUND_H
# define BRANCH_AND_BOUND_H
#ifndef BRANCH_AND_BOUND_H
#define BRANCH_AND_BOUND_H

#include <concepts>
#include <utility>
Expand Down Expand Up @@ -284,7 +284,6 @@ and requires(Domain &domain, typename Domain::State &state, const typename Domai
{ domain.undo(state, move) } -> std::same_as<void>;
};


/** @brief Reusable branch-and-bound engine over implicit state spaces.
*
* @tparam Domain Problem adapter exposing `bound(state)`, `is_complete(state)`
Expand Down Expand Up @@ -486,8 +485,7 @@ public:

/** @brief Branch and bound with visited-bound map and solution callback. */
template <typename VisitedMap, typename OnSolution>
requires SearchStateKeyProvider<Domain>
and SearchSolutionVisitor<OnSolution, Solution>
requires SearchStateKeyProvider<Domain> and SearchSolutionVisitor<OnSolution, Solution>
[[nodiscard]] Result search(State initial_state, VisitedMap &visited_map, OnSolution &on_solution)
{
using State_Key = typename Domain::State_Key;
Expand Down Expand Up @@ -717,8 +715,8 @@ private:
return false;
}

const Objective bound_value = domain_.bound(state);
if (not result.incumbent.can_improve(bound_value))
if (const Objective bound_value = domain_.bound(state);
not result.incumbent.can_improve(bound_value))
{
++result.stats.pruned_by_bound;
return false;
Expand All @@ -733,8 +731,15 @@ private:

auto explore_move = [&](const Move &move) -> bool
{
return apply_move_and_recurse(move, state, path, result, stop,
[&]() { return dfs(state, path, depth + 1, result, on_solution); });
return apply_move_and_recurse(move,
state,
path,
result,
stop,
[&]()
{
return dfs(state, path, depth + 1, result, on_solution);
});
};

if (ordering_active_for_depth_first())
Expand Down Expand Up @@ -764,8 +769,7 @@ private:
}

template <typename OnSolution, typename VisitedMap>
requires SearchSolutionVisitor<OnSolution, Solution>
and SearchStateKeyProvider<Domain>
requires SearchSolutionVisitor<OnSolution, Solution> and SearchStateKeyProvider<Domain>
[[nodiscard]] bool dfs_visited(State &state,
SearchPath<Move> &path,
const size_t depth,
Expand Down Expand Up @@ -826,7 +830,8 @@ private:
was_inserted = true;
}

auto rollback_visited = [&]() {
auto rollback_visited = [&]()
{
if (was_inserted)
visited.remove(key);
else if (auto *pair = visited.search(key); pair != nullptr)
Expand All @@ -844,8 +849,15 @@ private:
{
auto explore_move = [&](const Move &move) -> bool
{
return apply_move_and_recurse(move, state, path, result, stop,
[&]() { return dfs_visited(state, path, depth + 1, result, on_solution, visited); });
return apply_move_and_recurse(move,
state,
path,
result,
stop,
[&]()
{
return dfs_visited(state, path, depth + 1, result, on_solution, visited);
});
};

if (ordering_active_for_depth_first())
Expand Down Expand Up @@ -1009,4 +1021,4 @@ template <BranchAndBoundDomain Domain,

} // end namespace Aleph

# endif // BRANCH_AND_BOUND_H
#endif // BRANCH_AND_BOUND_H
Loading
Loading