(no commit message)
[jalview.git] / forester / java / src / org / forester / pccx / ScoringMethodForExternalNode.java
1 // $Id:
2 // $
3 // FORESTER -- software libraries and applications
4 // for evolutionary biology research and applications.
5 //
6 // Copyright (C) 2008-2009 Christian M. Zmasek
7 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
8 // All rights reserved
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 //
24 // Contact: phylosoft @ gmail . com
25 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
26
27 package org.forester.pccx;
28
29 import java.util.SortedMap;
30
31 import org.forester.phylogeny.Phylogeny;
32 import org.forester.phylogeny.PhylogenyNode;
33
34 /*
35  * Interface providing implementations of scoring methods used by
36  * ExternalNodeBasedCoverageMethod.
37  *
38  * @author Christian M. Zmasek
39  */
40 public interface ScoringMethodForExternalNode {
41
42     /**
43      * This calculates the coverage score for one external node.
44      *
45      *
46      * @param external_node_scores
47      *            SortedMap<PhylogenyNode, Double> in which the external node
48      *            scores are stored (node->score)
49      * @param phylogeny
50      *            Phylogeny containing the external nodes to score
51      * @param external_node
52      *            PhylogenyNod for which to calculate the score
53      * @param options
54      *            CoverageCalculationOptions
55      * @param annotate_phylogeny
56      *
57      */
58     public void calculateScoreForExternalNode( final SortedMap<PhylogenyNode, Double> external_node_scores,
59                                                final Phylogeny phylogeny,
60                                                final PhylogenyNode external_node,
61                                                final CoverageCalculationOptions options );
62
63     /**
64      * This returns a short description of this scoring method
65      *
66      * @return short description of this scoring method
67      */
68     public String getDesciption();
69
70     /**
71      * This calculates a normalization factor, so that a normalized score of 1.0
72      * means complete coverage.
73      *
74      *
75      * @param phylogeny
76      *            Phylogeny containing the external nodes to score
77      * @return normalization factor
78      */
79     public double getNormalizationFactor( final Phylogeny phylogeny );
80 }