> First, I was wondering if Igraph considers IGRAPH_INFINITY as zero or
> as other value.
IGRAPH_INFINITY is infinity, period. It is there only to provide us with a 
sort-of-platform-independent way to refer to infinity.

> I am working with shortest-paths matrices and I would
> like the distance between two vertices that can not reach each other
> to be zero.
Well, you have to check all the cells in the matrix and if a cell is equal to 
IGRAPH_INFINITY, you have to set it to  zero.

> (I tryied to do "igraph_matrix_scale(matrix,1./2)" and it gave
> me a zero-matrix).
Theoretically it should work; there is no limitation on igraph_matrix_scale to 
work on integer values only. I have just tested it on my machine and it worked 
for me, so I guess that the error is somewhere else; for instance, in the way 
you print the values.

Cheers,
-- 
T.


_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to