aganezov / bg

Breakpoint graph implementation in Python programming language
MIT License
2 stars 0 forks source link

Going between head and tail vertices #3

Open ANekhai opened 6 years ago

ANekhai commented 6 years ago

Hey, Would it be possible to implement a function that can go between the head and tail vertices of the same block? Say from 1t to 1h (or vice versa) even though there isn't necessarily a BGedge between them?

Thanks, Anton

aganezov commented 6 years ago

Can you elaborate? What do you mean by "can go"? If you mean: how can you, having one segments extremity, get another vertex, representing another segment extremity, you can do so by using the mate_vertex attribute on a given BGVertex instance.

For more, look at functions get_blocks_order and _traverse_blocks_from_vertex methods in the BreakpointGraph class.