gov.sandia.cognition.math.matrix.mtj
Class MatrixEntryIndexComparatorMTJ

java.lang.Object
  extended by gov.sandia.cognition.math.matrix.mtj.MatrixEntryIndexComparatorMTJ
All Implemented Interfaces:
EntryIndexComparator<MatrixEntry>

public class MatrixEntryIndexComparatorMTJ
extends Object
implements EntryIndexComparator<MatrixEntry>

An index comparator for MTJ matrices.

Since:
1.0
Author:
Justin Basilico

Nested Class Summary
 
Nested classes/interfaces inherited from interface gov.sandia.cognition.math.matrix.EntryIndexComparator
EntryIndexComparator.Compare
 
Field Summary
static MatrixEntryIndexComparatorMTJ INSTANCE
          An instance of this class since it has no internal fields.
 
Constructor Summary
MatrixEntryIndexComparatorMTJ()
          Creates a new instance of MatrixEntryComparatorMTJ
 
Method Summary
 EntryIndexComparator.Compare lowestIndex(MatrixEntry firstEntry, MatrixEntry secondEntry)
          Determines which iterator has the lowest index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final MatrixEntryIndexComparatorMTJ INSTANCE
An instance of this class since it has no internal fields.

Constructor Detail

MatrixEntryIndexComparatorMTJ

public MatrixEntryIndexComparatorMTJ()
Creates a new instance of MatrixEntryComparatorMTJ

Method Detail

lowestIndex

public EntryIndexComparator.Compare lowestIndex(MatrixEntry firstEntry,
                                                MatrixEntry secondEntry)
Determines which iterator has the lowest index

Specified by:
lowestIndex in interface EntryIndexComparator<MatrixEntry>
Parameters:
firstEntry - first entry to consider
secondEntry - second entry to consider
Returns:
FIRST_LOWEST if firstIterator has lowest index, SECOND_LOWEST if secondIterator has lowest index, ENTRIES_EQUAL if both are equal BOTH_ENTRIES_NULL if both are null FIRST_ENTRY_NULL if first entry is null SECOND_ENTRY_NULL if second entryis null