79703d449b90bd28cb505a14ea3748f0d4b3334c
[jalview.git] / src / jalview / datamodel / ContactListProviderI.java
1 package jalview.datamodel;
2
3 public interface ContactListProviderI
4 {
5
6   /**
7    * 
8    * @return position index for this contact List (usually sequence position or
9    *         alignment column)
10    */
11   int getPosition();
12
13   /**
14    * dimension of list where getContactAt(column<getContactHeight()) may return
15    * a value
16    * 
17    * @return
18    */
19   int getContactHeight();
20
21   /**
22    * get a value representing contact at column for this site
23    * 
24    * @param column
25    * @return Double.NaN or a contact strength for this site
26    */
27   double getContactAt(int column);
28
29
30   /**
31    * Return positions in local reference corresponding to cStart and cEnd in matrix data. Positions are base 1 column indices for sequence associated matrices.
32    * @param cStart
33    * @param cEnd
34    * @return int[] { start, end (inclusive) for each contiguous segment}
35    */
36   default int[] getMappedPositionsFor(int cStart, int cEnd) {
37     return new int[] { cStart, cEnd};
38   }
39
40 }