~ubuntu-branches/ubuntu/utopic/libhac-java/utopic

« back to all changes in this revision

Viewing changes to src/ch/usi/inf/sape/hac/ClusteringBuilderMultiplexer.java

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2014-04-10 20:59:14 UTC
  • Revision ID: package-import@ubuntu.com-20140410205914-jul0jw261jyyy6nn
Tags: upstream-0.20110510
ImportĀ upstreamĀ versionĀ 0.20110510

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is licensed to You under the "Simplified BSD License".
 
3
 * You may not use this software except in compliance with the License. 
 
4
 * You may obtain a copy of the License at
 
5
 *
 
6
 * http://www.opensource.org/licenses/bsd-license.php
 
7
 * 
 
8
 * See the COPYRIGHT file distributed with this work for information
 
9
 * regarding copyright ownership.
 
10
 */
 
11
package ch.usi.inf.sape.hac;
 
12
 
 
13
 
 
14
/**
 
15
 * A ClusteringBuilderMultiplexer is a ClusteringBuilder that forwards calls to two other ClusteringBuilders.
 
16
 * 
 
17
 * @author Matthias.Hauswirth@usi.ch
 
18
 */
 
19
public final class ClusteringBuilderMultiplexer implements ClusteringBuilder {
 
20
 
 
21
    private final ClusteringBuilder a;
 
22
    private final ClusteringBuilder b;
 
23
 
 
24
 
 
25
    public ClusteringBuilderMultiplexer(final ClusteringBuilder a, final ClusteringBuilder b) {
 
26
        this.a = a;
 
27
        this.b = b;
 
28
    }
 
29
 
 
30
    public void merge(final int i, final int j, final double dissimilarity) {
 
31
        a.merge(i, j, dissimilarity);
 
32
        b.merge(i, j, dissimilarity);
 
33
    }
 
34
 
 
35
}