Added some Debug functions in the header file to be implemented. Reconfigured javadocs to be more consistent and prettier.

This commit is contained in:
2026-03-02 14:10:08 -05:00
parent 9d8558e75c
commit 7d82612b69
61 changed files with 84 additions and 11332 deletions

View File

@@ -26,6 +26,11 @@ Graph::Graph(Graph&& new_location) noexcept
e_capacity(std::exchange(new_location.e_capacity, 0)) {}
// End : Construction & Deconstruction
// ----------------------- BEGIN : Printing -----------------------
// ----------------------- END : Printing -----------------------
// ----------------------- BEGIN : Getters -----------------------
@@ -42,27 +47,27 @@ Edge* Graph::get_p_edges(int p_index) noexcept
if(head_idx == -1) return nullptr;
return &all_edges[head_idx];
}
}
// ----------------------- END : Getters -----------------------
// ----------------------- BEGIN : Mutators -----------------------
Point* Graph::add_point(std::string name, float x, float y, float z) noexcept {
int target_idx = -1;
int target = -1;
if (next_free_point != -1) {
target_idx = next_free_point;
target = next_free_point;
// The hijacked 'first_edge' tells us where the NEXT hole is
next_free_point = all_points[target_idx].first_edge;
next_free_point = all_points[target].first_edge;
}
else if (num_points < p_capacity) {
target_idx = (int)num_points;
target = (int)num_points;
num_points++;
}
else return nullptr;
Point* p = &all_points[target_idx];
Point* p = &all_points[target];
p->name = name;
p->x = x; p->y = y; p->z = z;
p->first_edge = -1;