Return new CostMatrix from IncludeEdge and ExcludeEdge