package particlefiltering;

import java.util.Comparator;

public class comparator implements Comparator<Object> {

	public int compare( Object obj1, Object obj2 ) {  
		particle c1 = (particle) obj1;  
		particle c2 = (particle) obj2;  
		if( c1.get_weight() > c2.get_weight() )
		    return -1;
		if( c1.get_weight() < c2.get_weight() )
		    return 1;
		return 0;
	}  
}
