Skip to content

Create macros for algorithm tracing steps #85

@adamconkey

Description

@adamconkey

In the algorithm tracing added in #84 I have the log calls that look like this:

debug!(
    "{}",
    GrahamScanStep {
         idx: idx + 1,
         new_id: Some(new_v.id),
         hull_ids: stack.clone(),
    }
);

Would like to create macros to really tighten that up, for example:

log_graham_step!(idx + 1, new_v.id, stack.clone())

Perhaps there is a cool way to implement such that you wouldn't have to define a unique one per algorithm, but for now I'm okay with doing that as a simple approach, and will immediately gain from the cleanup in the algorithm code.

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions