2 |
26 Feb 07 |
jari |
1 |
/* |
2 |
26 Feb 07 |
jari |
Copyright @ 1999-2003, The Institute for Genomic Research (TIGR). |
2 |
26 Feb 07 |
jari |
All rights reserved. |
2 |
26 Feb 07 |
jari |
4 |
*/ |
2 |
26 Feb 07 |
jari |
5 |
/* |
2 |
26 Feb 07 |
jari |
* $RCSfile: LinearEquation.java,v $ |
2 |
26 Feb 07 |
jari |
* $Revision: 1.1.1.1 $ |
2 |
26 Feb 07 |
jari |
* $Date: 2003/08/21 21:04:23 $ |
2 |
26 Feb 07 |
jari |
* $Author: braisted $ |
2 |
26 Feb 07 |
jari |
* $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 |
} |