~ubuntu-branches/debian/sid/geogebra/sid

« back to all changes in this revision

Viewing changes to geogebra/kernel/statistics/AlgoBinomialDistBarChart.java

  • Committer: Package Import Robot
  • Author(s): Giovanni Mascellani
  • Date: 2012-01-10 11:37:41 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120110113741-satwohsd4de4ite1
Tags: 4.0.19.0+dfsg1-1
* New upstream version (closes: #649893).
* Update dependency: icedtea-plugin -> icedtea-netx-common (LP: #893007).
* New thumbnailer configuration compatible with Gnome 3.
* Package building is now managed by javahelper instead of upstream
  build.xml.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
GeoGebra - Dynamic Mathematics for Everyone
 
3
http://www.geogebra.org
 
4
 
 
5
This file is part of GeoGebra.
 
6
 
 
7
This program is free software; you can redistribute it and/or modify it 
 
8
under the terms of the GNU General Public License as published by 
 
9
the Free Software Foundation.
 
10
 
 
11
*/
 
12
 
 
13
package geogebra.kernel.statistics;
 
14
 
 
15
import geogebra.kernel.AlgoDrawInformation;
 
16
import geogebra.kernel.AlgoFunctionAreaSums;
 
17
import geogebra.kernel.Construction;
 
18
import geogebra.kernel.GeoBoolean;
 
19
import geogebra.kernel.arithmetic.NumberValue;
 
20
 
 
21
/**
 
22
 * @author G. Sturr
 
23
 * @version 2011-06-21
 
24
 */
 
25
 
 
26
public class AlgoBinomialDistBarChart extends AlgoFunctionAreaSums {
 
27
 
 
28
        private static final long serialVersionUID = 1L;
 
29
 
 
30
        public AlgoBinomialDistBarChart(Construction cons, String label, 
 
31
                        NumberValue n, NumberValue p) {
 
32
        super(cons,label, n, p, null, null, AlgoFunctionAreaSums.TYPE_BARCHART_BINOMIAL);
 
33
    }
 
34
        
 
35
        
 
36
        public AlgoBinomialDistBarChart(Construction cons, String label, 
 
37
                        NumberValue n, NumberValue p, GeoBoolean isCumulative) {
 
38
        super(cons,label, n, p, null, isCumulative, AlgoFunctionAreaSums.TYPE_BARCHART_BINOMIAL);
 
39
    }
 
40
        
 
41
        private AlgoBinomialDistBarChart( 
 
42
                        NumberValue n, NumberValue p, GeoBoolean isCumulative,NumberValue a,NumberValue b,double[]vals,
 
43
                        double[]borders,int N) {
 
44
        super(n, p, null, isCumulative, AlgoFunctionAreaSums.TYPE_BARCHART_BINOMIAL,a,b,vals,borders,N);
 
45
    }
 
46
        
 
47
 
 
48
    public String getClassName() {
 
49
        return "AlgoBinomialDistBarChart";
 
50
    }
 
51
 
 
52
        public AlgoDrawInformation copy() {             
 
53
                GeoBoolean b = (GeoBoolean)this.getIsCumulative();
 
54
                if(b!=null)b=(GeoBoolean)b.copy();
 
55
                
 
56
                return new AlgoBinomialDistBarChart(
 
57
                                (NumberValue)this.getP1().deepCopy(kernel),(NumberValue)this.getP2().deepCopy(kernel),
 
58
                                b,(NumberValue)this.getA().deepCopy(kernel),(NumberValue)this.getB().deepCopy(kernel),
 
59
                                getValues().clone(),getLeftBorder().clone(),getIntervals());
 
60
        }
 
61
}
 
62