git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d326d3
)
JAL-2349 adjusted range calculation to be inclusive rather than inclusive, exclusive...
author
Jim Procter
<j.procter@dundee.ac.uk>
Thu, 20 Oct 2022 09:50:42 +0000
(10:50 +0100)
committer
Jim Procter
<j.procter@dundee.ac.uk>
Thu, 20 Oct 2022 09:50:42 +0000
(10:50 +0100)
src/jalview/datamodel/ContactListImpl.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/ContactListImpl.java
b/src/jalview/datamodel/ContactListImpl.java
index
6eb4cdb
..
561048e
100644
(file)
--- a/
src/jalview/datamodel/ContactListImpl.java
+++ b/
src/jalview/datamodel/ContactListImpl.java
@@
-10,7
+10,6
@@
public class ContactListImpl implements ContactListI
{
ContactListProviderI clist;
-
public static ContactListI newContactList(ContactListProviderI list)
{
return new ContactListImpl(list);
@@
-53,7
+52,7
@@
public class ContactListImpl implements ContactListI
cr.setFrom_column(from_column);
cr.setTo_column(to_column);
double tot = 0;
- for (int i = from_column; i < to_column; i++)
+ for (int i = from_column; i <= to_column; i++)
{
double contact = getContactAt(i);
tot += contact;
@@
-80,7
+79,7
@@
public class ContactListImpl implements ContactListI
}
if (tot > 0)
{
- cr.setMean(tot / (to_column - from_column));
+ cr.setMean(tot / (1 + to_column - from_column));
}
else
{