How to find loops in digraphs



Hi,
i had to construct a graph from a matrix. I made it, but it is a digraph
now, because i needed some parallel edges from-to the same vertices. But it
seems like there is few graph properties options.

Is there a free/opensource module w. can add some new functions/properties
to work with digraphs?

Can you show me how can i find closed cycles (edges which are connected in
a closed loop, for example: there are vertice 1, vertice 2 and 2 edges: 1-2
and 2-1. Its a closed loop. Or Vertices 1,2,3 and edges: 1-2, 2-3, 3-1) in
a digraph?

Thak you and sorry for bad english,
GV