mev-4.0.01/source/org/tigr/util/math/LinearEquation.java

Code
Comments
Other
Rev Date Author Line
2 26 Feb 07 jari 1 /*
2 26 Feb 07 jari 2 Copyright @ 1999-2003, The Institute for Genomic Research (TIGR).
2 26 Feb 07 jari 3 All rights reserved.
2 26 Feb 07 jari 4 */
2 26 Feb 07 jari 5 /*
2 26 Feb 07 jari 6  * $RCSfile: LinearEquation.java,v $
2 26 Feb 07 jari 7  * $Revision: 1.1.1.1 $
2 26 Feb 07 jari 8  * $Date: 2003/08/21 21:04:23 $
2 26 Feb 07 jari 9  * $Author: braisted $
2 26 Feb 07 jari 10  * $State: Exp $
2 26 Feb 07 jari 11  */
2 26 Feb 07 jari 12 package org.tigr.util.math;
2 26 Feb 07 jari 13
2 26 Feb 07 jari 14 public class LinearEquation {
2 26 Feb 07 jari 15     private double slope, yIntercept, regressionCoefficient;
2 26 Feb 07 jari 16     
2 26 Feb 07 jari 17     public LinearEquation() {
2 26 Feb 07 jari 18   this.slope = 0;
2 26 Feb 07 jari 19   this.yIntercept = 0;
2 26 Feb 07 jari 20   this.regressionCoefficient = 0;
2 26 Feb 07 jari 21     }
2 26 Feb 07 jari 22     
2 26 Feb 07 jari 23     public LinearEquation(double slope, double yIntercept, double regressionCoefficient) {
2 26 Feb 07 jari 24   this.slope = slope;
2 26 Feb 07 jari 25   this.yIntercept = yIntercept;
2 26 Feb 07 jari 26   this.regressionCoefficient = regressionCoefficient;
2 26 Feb 07 jari 27     }
2 26 Feb 07 jari 28     
2 26 Feb 07 jari 29     public void setSlope(double slope) {this.slope = slope;}
2 26 Feb 07 jari 30     public double getSlope() {return this.slope;}
2 26 Feb 07 jari 31     public void setYIntercept(double yIntercept) {this.yIntercept = yIntercept;}
2 26 Feb 07 jari 32     public double getYIntercept() {return this.yIntercept;}
2 26 Feb 07 jari 33     public void setRegressionCoefficient(double regressionCoefficient) {
2 26 Feb 07 jari 34   this.regressionCoefficient = regressionCoefficient;
2 26 Feb 07 jari 35     }
2 26 Feb 07 jari 36     public double getRegressionCoefficient() {return this.regressionCoefficient;}
2 26 Feb 07 jari 37 }