Package org.apache.sysds.hops.codegen.template

## Class TemplateCell.HopInputComparator

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

All Implemented Interfaces:
  `Comparator<Hop>`

Enclosing class:
  TemplateCell

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

Comparator to order input hops of the cell template. We try to order matrices-vectors-scalars via sorting by number of cells and for equal number of cells by sparsity to prefer sparse inputs as the main input for sparsity exploitation.

### Constructor Summary

Constructors
`HopInputComparator()`
`HopInputComparator​(Hop driver)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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

`equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

### Constructor Detail

#### HopInputComparator

    public HopInputComparator()

#### HopInputComparator

    public HopInputComparator​(Hop driver)

### Method Detail

#### compare

    public int compare​(Hop h1,
                       Hop h2)

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