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

« back to all changes in this revision

Viewing changes to src/ch/usi/inf/sape/hac/dendrogram/ObservationNode.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.dendrogram;
 
12
 
 
13
 
 
14
/**
 
15
 * An ObservationNode represents a leaf node in a Dendrogram.
 
16
 * It corresponds to a singleton cluster of one observation.
 
17
 * 
 
18
 * @author Matthias.Hauswirth@usi.ch
 
19
 */
 
20
public final class ObservationNode implements DendrogramNode {
 
21
 
 
22
        private final int observation;
 
23
 
 
24
        
 
25
        public ObservationNode(final int observation) {
 
26
                this.observation = observation;
 
27
        }
 
28
        
 
29
        public final DendrogramNode getLeft() {
 
30
                return null;
 
31
        }
 
32
        
 
33
        public final DendrogramNode getRight() {
 
34
                return null;
 
35
        }
 
36
        
 
37
        public int getObservationCount() {
 
38
                return 1;
 
39
        }
 
40
        
 
41
        public final int getObservation() {
 
42
                return observation;
 
43
        }
 
44
 
 
45
}
 
 
b'\\ No newline at end of file'