I can proccess queries like "change the value in a vertex", calculate something on a path.
And how to change the value on an edge? I have an idea to store in a vertex edge's weight from the vertex to it's left child (in Splay tree). But there is a problem with changing the root of the tree: after reversing an edge values in the vertexes will become incorrect. Probably I should somehow push value from vertex to it's left child..
(Arc goes to left child, grey vertex is the root)
Could you tell me how to store and change edge's weight correctly using Link-cut tree