Rules to follow to create edges in graph I am currently writing a graph object in Swift, I see that there are different types of graphs, some that are undirected and some that are directed. Here are my questions :


Can a graph be both directed and undirected, is there a specific name for such graph?
What is the common approach to make an edge that would be bi-directionnal but whose weight depends on the direction you are following. Would it be acceptable to make an edge that hold two weights, one for each direction? Or should I create two edges?


Thank you.
A graph that is both directed and undirected is called a Mixed graph. 

All graph libraries that I know don't have direction dependent edge properties. Hence I would advise against introducing them if two directed edges do the job.