Package org.apache.sysds.lops.compile
Class LopComparator<N extends Lop>
- java.lang.Object
-
- org.apache.sysds.lops.compile.LopComparator<N>
-
- Type Parameters:
N
- class extending Lop
- All Implemented Interfaces:
Comparator<N>
public class LopComparator<N extends Lop> extends Object implements Comparator<N>
Comparator class used in sorting the LopDAG in topological order. Refer to doTopologicalSort_strict_order() in dml/lops/compile/Dag.java Topological sort guarantees the following: 1) All lops with level i appear before any lop with level greater than i (source nodes are at level 0) 2) Within a given level, nodes are ordered by their ID i.e., by the other in which they are created compare() method is designed to respect the above two requirements.
-
-
Constructor Summary
Constructors Constructor Description LopComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(N o1, N o2)
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-