Fix residual merge conflicts
This commit is contained in:
parent
9c7a35f73f
commit
3a19266843
|
|
@ -350,7 +350,7 @@ public final class SeqGraph extends BaseGraph<SeqVertex> {
|
||||||
protected class MergeDiamonds extends VertexBasedTransformer {
|
protected class MergeDiamonds extends VertexBasedTransformer {
|
||||||
@Override
|
@Override
|
||||||
protected boolean tryToTransform(final SeqVertex top) {
|
protected boolean tryToTransform(final SeqVertex top) {
|
||||||
final List<SeqVertex> middles = outgoingVerticesOf(top);
|
final Set<SeqVertex> middles = outgoingVerticesOf(top);
|
||||||
if ( middles.size() <= 1 )
|
if ( middles.size() <= 1 )
|
||||||
// we can only merge if there's at least two middle nodes
|
// we can only merge if there's at least two middle nodes
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -407,7 +407,7 @@ public final class SeqGraph extends BaseGraph<SeqVertex> {
|
||||||
protected class MergeTails extends VertexBasedTransformer {
|
protected class MergeTails extends VertexBasedTransformer {
|
||||||
@Override
|
@Override
|
||||||
protected boolean tryToTransform(final SeqVertex top) {
|
protected boolean tryToTransform(final SeqVertex top) {
|
||||||
final List<SeqVertex> tails = outgoingVerticesOf(top);
|
final Set<SeqVertex> tails = outgoingVerticesOf(top);
|
||||||
if ( tails.size() <= 1 )
|
if ( tails.size() <= 1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -495,7 +495,7 @@ public final class SeqGraph extends BaseGraph<SeqVertex> {
|
||||||
protected class MergeHeadlessIncomingSources extends VertexBasedTransformer {
|
protected class MergeHeadlessIncomingSources extends VertexBasedTransformer {
|
||||||
@Override
|
@Override
|
||||||
boolean tryToTransform(final SeqVertex bottom) {
|
boolean tryToTransform(final SeqVertex bottom) {
|
||||||
final List<SeqVertex> incoming = incomingVerticesOf(bottom);
|
final Set<SeqVertex> incoming = incomingVerticesOf(bottom);
|
||||||
if ( incoming.size() <= 1 )
|
if ( incoming.size() <= 1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ public class SharedSequenceMerger {
|
||||||
if ( graph == null ) throw new IllegalArgumentException("graph cannot be null");
|
if ( graph == null ) throw new IllegalArgumentException("graph cannot be null");
|
||||||
if ( ! graph.vertexSet().contains(v) ) throw new IllegalArgumentException("graph doesn't contain vertex " + v);
|
if ( ! graph.vertexSet().contains(v) ) throw new IllegalArgumentException("graph doesn't contain vertex " + v);
|
||||||
|
|
||||||
final List<SeqVertex> prevs = graph.incomingVerticesOf(v);
|
final Set<SeqVertex> prevs = graph.incomingVerticesOf(v);
|
||||||
if ( ! canMerge(graph, v, prevs) )
|
if ( ! canMerge(graph, v, prevs) )
|
||||||
return false;
|
return false;
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue