Project

General

Profile

« Previous | Next » 

Revision 28483

branch 1.2

View differences:

DistanceAlgo.java
1
package eu.dnetlib.pace.distance;
2

  
3
import eu.dnetlib.pace.model.Field;
4

  
5
/**
6
 * Each field is configured with a distance algo which knows how to compute the distance (0-1) between the fields of two objects.
7
 */
8
public interface DistanceAlgo {
9

  
10
	/**
11
	 * Computes the distance between the two Fields.
12
	 * 
13
	 * @param a
14
	 *            the a
15
	 * @param b
16
	 *            the b
17
	 * @return the double
18
	 */
19
	public abstract double distance(Field a, Field b);
20

  
21
	/**
22
	 * Gets the weight.
23
	 * 
24
	 * @return the weight
25
	 */
26
	public double getWeight();
27

  
28
}

Also available in: Unified diff