/*
 * Copyright (C) 2008 The Trustees of Columbia University in the City of New York. 
 * All rights reserved.
 *
 * See the file LICENSE included in this distribution for details.
 */

#include "bamboodist.h"
#include <math.h>

BambooDist::BambooDist()
{
}

BambooDist::~BambooDist()
{
}

int32 BambooDist::getDistance(BigInt& src, BigInt& dest, BigInt& result)
{
  //distance function is abs |a| 
  if(src<dest)
    result = dest-src;
  else
    result = src-dest;

  return 1;
}

int32 BambooDist::getKeyAt(uint32 iPos, BigInt& objKey){

  return 1;
}
