116 |
26 Jun 06 |
enell |
1 |
/* |
116 |
26 Jun 06 |
enell |
$Id$ |
116 |
26 Jun 06 |
enell |
3 |
|
116 |
26 Jun 06 |
enell |
Copyright (C) 2006 Johan Enell |
116 |
26 Jun 06 |
enell |
5 |
|
116 |
26 Jun 06 |
enell |
This file is part of BASE - BioArray Software Environment. |
116 |
26 Jun 06 |
enell |
Available at http://base.thep.lu.se/ |
116 |
26 Jun 06 |
enell |
8 |
|
116 |
26 Jun 06 |
enell |
BASE is free software; you can redistribute it and/or modify it |
116 |
26 Jun 06 |
enell |
under the terms of the GNU General Public License as published by |
116 |
26 Jun 06 |
enell |
the Free Software Foundation; either version 2 of the License, or |
116 |
26 Jun 06 |
enell |
(at your option) any later version. |
116 |
26 Jun 06 |
enell |
13 |
|
116 |
26 Jun 06 |
enell |
BASE is distributed in the hope that it will be useful, but |
116 |
26 Jun 06 |
enell |
WITHOUT ANY WARRANTY; without even the implied warranty of |
116 |
26 Jun 06 |
enell |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
116 |
26 Jun 06 |
enell |
General Public License for more details. |
116 |
26 Jun 06 |
enell |
18 |
|
116 |
26 Jun 06 |
enell |
You should have received a copy of the GNU General Public License |
116 |
26 Jun 06 |
enell |
along with this program; if not, write to the Free Software |
116 |
26 Jun 06 |
enell |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
116 |
26 Jun 06 |
enell |
02111-1307, USA. |
116 |
26 Jun 06 |
enell |
23 |
*/ |
118 |
26 Jun 06 |
enell |
24 |
package base1null; |
116 |
26 Jun 06 |
enell |
25 |
|
116 |
26 Jun 06 |
enell |
26 |
public class Spot |
116 |
26 Jun 06 |
enell |
27 |
{ |
116 |
26 Jun 06 |
enell |
28 |
|
116 |
26 Jun 06 |
enell |
29 |
private final float int1; |
116 |
26 Jun 06 |
enell |
30 |
private final float int2; |
116 |
26 Jun 06 |
enell |
31 |
|
116 |
26 Jun 06 |
enell |
32 |
public Spot(float int1, float int2) |
116 |
26 Jun 06 |
enell |
33 |
{ |
116 |
26 Jun 06 |
enell |
34 |
this.int1 = int1; |
116 |
26 Jun 06 |
enell |
// TODO Auto-generated constructor stub |
116 |
26 Jun 06 |
enell |
36 |
this.int2 = int2; |
116 |
26 Jun 06 |
enell |
37 |
} |
116 |
26 Jun 06 |
enell |
38 |
|
116 |
26 Jun 06 |
enell |
39 |
public final float getInt1() |
116 |
26 Jun 06 |
enell |
40 |
{ |
116 |
26 Jun 06 |
enell |
41 |
return int1; |
116 |
26 Jun 06 |
enell |
42 |
} |
116 |
26 Jun 06 |
enell |
43 |
|
116 |
26 Jun 06 |
enell |
44 |
public final float getInt2() |
116 |
26 Jun 06 |
enell |
45 |
{ |
116 |
26 Jun 06 |
enell |
46 |
return int2; |
116 |
26 Jun 06 |
enell |
47 |
} |
116 |
26 Jun 06 |
enell |
48 |
|
116 |
26 Jun 06 |
enell |
49 |
public final float getM() |
116 |
26 Jun 06 |
enell |
50 |
{ |
116 |
26 Jun 06 |
enell |
51 |
return (float) (Math.log(getInt1()/getInt2())/Math.log(2)); |
116 |
26 Jun 06 |
enell |
52 |
} |
116 |
26 Jun 06 |
enell |
53 |
|
116 |
26 Jun 06 |
enell |
54 |
public final float getA() |
116 |
26 Jun 06 |
enell |
55 |
{ |
116 |
26 Jun 06 |
enell |
56 |
return (float) Math.log10(Math.sqrt(getInt1() * getInt2())); |
116 |
26 Jun 06 |
enell |
57 |
} |
116 |
26 Jun 06 |
enell |
58 |
} |