uml class diagram for graph type system

I am trying to figure out what a UML class diagram would look like for a system designed like a graph data structure.

The system is a series of relationships (R# is the relationship, A,B,C are the nodes):
R1 = A----B
R2 = B----C
R3 = A—B----C

In my case the relationships are the most important part. R1 can actually represent the relationship between a lot of nodes. But there is only one type of relationship R1. I am trying to come up with a UML diagram for such a system, and was wondering if anyone can give some advice to point me in the right direction.

Keep in mind that UML class diagrams show class relationships, not data relationships.

A giant,complex, multi-pathed graph of nodes is a single box in a UML class diagram if all the nodes are the same class.

Instead of just a static representation of your system you could consider an object diagram as well. It would provide you with a more dynamics view that would represent your actually data structure in your system at a given time.

If you have a graph, why not represent it using one of the classics: adjacency list or adjacency matrix? Simply annotate the vertices and nodes with your specific data, and you should be able to adapt all manner of useful known algorithms for your own ends (DFS, BFS, etc.).

I assume that what you meant as your question is: how do I design a data structure for representing these relationships? A UML diagram is merely documentation of a design, not a design in itself (syntax vs. semantics: the diagram is syntax, the design is semantics).