2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.datamodel;
23 public class FloatContactMatrix extends GroupSetHolder
24 implements ContactMatrixI
27 int maxrow = 0, maxcol = 0;
33 public FloatContactMatrix(float[][] matrix)
36 for (float[] row : matrix)
38 if (row.length > maxcol)
51 maxrow = matrix.length;
55 public FloatContactMatrix(float[][] elements2, GroupSet grps2)
62 * getContactList(column) @returns the vector of predicted alignment errors
63 * for reference position given by column
66 public ContactListI getContactList(final int column)
68 if (column < 0 || column >= elements.length)
73 return new ContactListImpl(new ContactListProviderI()
76 public int getPosition()
82 public int getContactHeight()
88 public double getContactAt(int mcolumn)
90 if (mcolumn < 0 || mcolumn >= elements[column].length)
94 return elements[column][mcolumn];
100 * getElementAt(column, i) @returns the predicted superposition error for the
101 * ith position when column is used as reference
104 public double getElementAt(int _column, int i)
106 return elements[_column][i];
110 public float getMin()
116 public float getMax()
122 public String getAnnotDescr()
124 // TODO Auto-generated method stub
129 public String getAnnotLabel()
131 // TODO Auto-generated method stub
136 public String getType()
142 public int getWidth()
148 public int getHeight()