I'm trying to implement in C some graph algorithms, using an adjacency matrix as support data structure. I need to implement a weighted graph, with weigths represented by a real number.
Given that 0 and negative numbers would be a correct weight for an edge, how can I represent the absence of an edge between two nodes?
nan()
– pmg