nyavim's blog

By nyavim, history, 13 hours ago, In English

Hello, Codeforces!

I've been working on a graph visualization tool for a while now, and because I couldn't think of a good name for it, I've opted to call it Another Graph Editor. If you have any name suggestions, pls let me know. Here's the website and the repo.

The layout is very much inspired by CS Academy's graph editor. Input is pretty straightforward too, as you may just copy paste the test case edge data into the text area using the form u v w, where w is an optional edge label. You do not need to enter n m, representing the number of nodes and vertices respectively.

Node labels are supported too! Suppose the problem offers an array a where a[i] represents the value at node i, you can just copy-paste it into Node Labels and it'll show up as little octagons hovering over the node. If you want to skip over a particular node (aka an empty label), use the character '_' as a placeholder.

In addition, to handle problems where you are given an array p where p[i] represents the parent of node i, you can click on Parent-Child, and you will be presented with a more convenient interface:

On the right, you may toggle Tree Mode, which rearranges the graph into a tree as you'd expect. If your graph isn't a tree, that's okay too! You'll be greeted with a DFS tree instead, best explained in this awesome blog.

By default, the first node that appears in the input data is the root. If you require some other node u as the root, a tip is to put it on the first line as either u or u u, or if you're in Parent-Child mode, you can prepend u to the front of the parent and child arrays.

Some other niceties include a dark mode, mobile support, the ability to show components (or strongly-connected components for directed graphs), as well as bridges and cut vertices.

Finally, use the Label Offset slider on the right panel to convert a zero-indexed input into one-indexed and vice versa. For example, if the input is one-indexed, use an offset of -1 to make it zero-indexed. Nodes with English characters or emojis as input would not be affected by the offset.

Welp, that's about it. Hope you enjoy using it! If you find any bugs or have any feature requests, do let me know. When I learn more advanced stuff like network flow, I might integrate it into the editor for convenient visualization.

  • Vote: I like it
  • +191
  • Vote: I do not like it

»
11 hours ago, # |
  Vote: I like it +14 Vote: I do not like it

really nice and clean UI, and easy to use. Great website!

»
11 hours ago, # |
  Vote: I like it +3 Vote: I do not like it

Whoa! This looks amazing! Thanks a lot. :D

»
11 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks!

»
11 hours ago, # |
  Vote: I like it +16 Vote: I do not like it

brilliant, it's 100% better than csacademy's graph editor!

»
11 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Wow! Nice!

»
11 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

We finally have a strong contender to csacademy. Good job man, this is incredible.

»
11 hours ago, # |
  Vote: I like it +13 Vote: I do not like it

there is only 1 problem, these node movements are so smooth that I will forget about the contest and play with them

»
11 hours ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

Great Tool! It's much more convenient and powerful than the old Graph Editor!

Could you improve it so that it can export the picture like the old one?

  • »
    »
    8 hours ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    Hii, thanks for the suggestion, it has been implemented, you can now download your graph as a png image!

»
9 hours ago, # |
  Vote: I like it +3 Vote: I do not like it

Seems like another bookmark tool. Thanks!

»
6 hours ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I actually like this one, one of the bests in my experience, and also handling dfs tree and bridges/cuts are of outstanding help. Thanks bro,

Better than cscademy

»
5 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

so cool!

»
3 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

u сan use use graphs.algocode.ru btw