Skip to content

add color attribute to GraphNode and GraphEdge#24

Merged
CipherYuvraj merged 2 commits intoCipherYuvraj:mainfrom
PrerakShah101:main
Oct 3, 2025
Merged

add color attribute to GraphNode and GraphEdge#24
CipherYuvraj merged 2 commits intoCipherYuvraj:mainfrom
PrerakShah101:main

Conversation

@PrerakShah101
Copy link
Contributor

Overview

This PR adds a color attribute to the GraphNode and GraphEdge structs in the graph models. The color attribute will allow the frontend to visually highlight nodes and edges during algorithm visualizations, improving the clarity and interactivity of the visualizations.

Changes

  • Added std::string color to GraphNode and GraphEdge.
  • Updated constructors to accept an optional color parameter with default values:
    • Nodes: "white"
    • Edges: "black"
  • Updated graph_model.cpp to initialize the new color fields.

Fixes #19

update constructors to initialize color for nodes and edges
add color attribute to GraphNode and GraphEdge
@CipherYuvraj CipherYuvraj merged commit a69b869 into CipherYuvraj:main Oct 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add color attribute to GraphNode and GraphEdge for visualization

2 participants

Comments