move the negative handler into the hashBytes() method

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_genomix@3044 123451ca-8445-de46-9d55-352943316053
diff --git a/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/data/partition/KmerHashPartitioncomputerFactory.java b/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/data/partition/KmerHashPartitioncomputerFactory.java
index 68faf59..bb6839e 100644
--- a/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/data/partition/KmerHashPartitioncomputerFactory.java
+++ b/genomix/genomix-hyracks/src/main/java/edu/uci/ics/genomix/data/partition/KmerHashPartitioncomputerFactory.java
@@ -15,7 +15,8 @@
 		int hash = 1;

 		for (int i = offset; i < offset + length; i++)

 			hash = (31 * hash) + (int) bytes[i];

-		return hash;

+		

+		return hash < 0 ? -hash: hash;

 	}

 

 	public static long getLong(byte[] bytes, int offset) {

@@ -48,9 +49,6 @@
 //				long l = getLong(buf.array(), startOffset + fieldOffset

 //						+ slotLength);

 				int part = hashBytes(buf.array(), startOffset + fieldOffset + slotLength, fieldLength) % nParts;

-				if (part < 0){

-					part = -part;

-				}

 				return part;

 			}

 		};