in cassovary-core/src/main/scala/com/twitter/cassovary/graph/bipartite/BipartiteGraph.scala [171:182]
def isDirStored(node: BipartiteNode, dir: GraphDir) = {
if (bipartiteGraphDir == BipartiteGraphDir.Both) true
else {
(node.isLeftNode, dir) match {
case (true, GraphDir.InDir) => bipartiteGraphDir == BipartiteGraphDir.RightToLeft
case (true, GraphDir.OutDir) => bipartiteGraphDir == BipartiteGraphDir.LeftToRight
case (false, GraphDir.InDir) => bipartiteGraphDir == BipartiteGraphDir.LeftToRight
case (false, GraphDir.OutDir) => bipartiteGraphDir == BipartiteGraphDir.RightToLeft
case (_, _) => false
}
}
}