Annotations allow you to customize how your code is visualized during execution. By adding special comments at specific points in your code, you can control the visualization behavior to better suit your needs.
Purpose: Prevents the visualizer from drawing function call nodes in the visualization tree.
Usage: Place this annotation directly above a function definition.
Example:
Use Case: This annotation is particularly useful when:
- Visualizing recursive algorithms, especially tree traversals
- You want to focus on data structure operations rather than function calls
- The function call tree would add unnecessary complexity to the visualization
Instead of showing a new function node for each recursive call, the visualizer will only show the movement between tree nodes, making the visualization clearer and more focused on the algorithm's behavior.
Purpose: Prevents the visualizer from drawing function call nodes to multiple sub trees.
Usage: Place this annotation directly above a function definition.
Example:
Use Case: This annotation is particularly useful when:
-
You want to visualize recursive function calls but avoid redundant representations of the same function in different sub-trees.
-
The function call tree would otherwise become too cluttered with repeated instances of the same function.
-
You want to maintain a cleaner and more concise visualization of the algorithm's flow.
Purpose: Completely skips the visualization of the function's execution and directly returns the function's result.
Usage: Place this annotation directly above a function definition.
Example:
Use Case: This annotation is particularly useful when:
- The function is a utility or helper function whose internal logic is not relevant to the visualization.
- You want to focus on higher-level operations and avoid cluttering the visualization with details of simple or well-understood functions.
- The function's execution is trivial or does not contribute significantly to the understanding of the algorithm.
More annotation types are planned for future releases to provide greater control over:
- Variable tracking
- Execution speed
- Visual styling
- Debug points
- Custom visualization events
Stay tuned for updates as new annotation features are added to the platform.
- Place annotations on their own line directly above the relevant code
- Use annotations sparingly to maintain clear visualizations
- Consider your audience when deciding which parts of the execution to show or hide
If you have ideas for new annotation types or improvements to existing ones, please feel free to contribute to the project or submit feature requests.