net.sf.jaer.biasgen
Class IPotArray.ShiftRegisterComparator
java.lang.Object
net.sf.jaer.biasgen.IPotArray.ShiftRegisterComparator
- All Implemented Interfaces:
- java.util.Comparator<IPot>
- Enclosing class:
- IPotArray
protected class IPotArray.ShiftRegisterComparator
- extends java.lang.Object
- implements java.util.Comparator<IPot>
orders pots in order of shift register so that bias at input end of SR is returned last, used in hardware interfaces to load bits.
The shift register index should be numbered so that lower numbers correspond to "closer to the input end" where the bits are loaded.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
IPotArray.ShiftRegisterComparator
protected IPotArray.ShiftRegisterComparator()
compare
public int compare(IPot p1,
IPot p2)
- Compares two pots.
- Specified by:
compare
in interface java.util.Comparator<IPot>
- Parameters:
p1
- first potp2
- second pot
- Returns:
- 1 if pot2 has larger shift register index than pot1, 0 if they have the same index, or -1 if pot1 has a larger index.
equals
public boolean equals(IPot p1,
IPot p2)