org.apache.sysds.hops.codegen.template

## Class TemplateRow.HopInputComparator

- java.lang.Object
- - org.apache.sysds.hops.codegen.template.TemplateRow.HopInputComparator

- All Implemented Interfaces:
    Comparator<Hop>
  Enclosing class:
    TemplateRow

      public static class TemplateRow.HopInputComparator
      extends Object
      implements Comparator<Hop>

  Comparator to order input hops of the row aggregate template. We try to order matrices-vectors-scalars via sorting by number of cells but we keep the given main input always at the first position.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HopInputComparator(Hop X, Hop B1)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Hop h1, Hop h2)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### HopInputComparator

          public HopInputComparator(Hop X,
                                    Hop B1)

  - ### Method Detail

    - #### compare

          public int compare(Hop h1,
                             Hop h2)

      Specified by:
        `compare` in interface `Comparator<Hop>`

Copyright © 2021 The Apache Software Foundation. All rights reserved.