/*
    $Id: indexentry.cc 1107 2007-04-16 23:59:13Z rvernica $

    Copyright (C) 2007 by The Regents of the University of California

    Redistribution of this file is permitted under the terms of the
    GNU Public License (GPL).

    Date: 05/04/2006
    Author: Rares Vernica <rvernica@ics.uci.edu>
*/

#include "indexentry.h"

bool operator<(const IndexEntry &left, const IndexEntry &right) 
{
  if (&left == &right)
    return false;
  if (left.dist != right.dist) 
    {
      return left.dist < right.dist;
    }
  return left.index < right.index;
}

ostream& operator<<(ostream &out, const IndexEntry &e)
{
  return out << e.index << "\t" << e.dist;
}

bool operator<(const IndexEntryVect &left, const IndexEntryVect &right) 
{
  if (&left == &right)
    return false;
  return left.vect.getDist() < right.vect.getDist();
}
