/*
 * Created on 30-apr-2004
 */
package jaCop.nodeStatus;

/**
 * @author Lompa
 */
public class WeightedLoadFactorCalculator implements ILoadFactorCalculator{
	
	private int weight = 5;
	
	public WeightedLoadFactorCalculator(int weight){
		this.weight = weight;
	}
	
	/* (non-Javadoc)
	 * @see jaCop.nodeStatus.ILoadFactorCalculator#calculateLoadFactor(jaCop.nodeStatus.CommunityStatusStore)
	 */
	public float calculateLoadFactor(CommunityStatusStore store) {
		return store.getNeighborsNumber()/ (float) this.weight;
	}
}
