source: branches/localSpectral/src/clustering/SeedTransformer.java @ 31

Last change on this file since 31 was 27, checked in by toshi, 14 years ago

creato il branch local spectral

File size: 385 bytes
RevLine 
[27]1
2package clustering;
3
4import org.apache.commons.collections15.Transformer;
5
6public class SeedTransformer<V> implements Transformer{
7
8    private V seed;
9
10    public SeedTransformer(V vertexSeed) {
11        this.seed = vertexSeed;
12    }
13
14    public Object transform(Object vertex) {
15        if (seed.equals(vertex))
16            return 1.0;
17        else
18            return 0.0;
19
20    }
21
22}
Note: See TracBrowser for help on using the repository browser.