1 package jalview.datamodel;
10 * <p>Copyright: Copyright (c) 2004</p>
12 * <p>Company: Dundee University</p>
14 * @author not attributable
17 public class AlignmentOrder
19 public AlignmentOrder()
23 public void setType(int Type)
33 public void setName(String Name)
38 public String getName()
43 public void setOrder(Vector Order)
48 public Vector getOrder()
53 // JBPNote : this method would return a vector containing all sequences in seqset
54 // with those also contained in order at the beginning of the vector in the order
55 // given by order. AlignmentSorter.vectorSubsetToArray already does this, but that method
56 // should be here for completeness.
58 /* public Vector getOrder(AlignmentI seqset)
60 Vector perm = new Vector(seqset.getHeight());
61 for (i=0, o = 0, n=seqset.getHeight(), p = Order.size(); i<n; i++)
62 perm.setElement(i,...).
66 public static final int FILE = 0;
67 public static final int MSA = 1;
68 public static final int USER = 2;
72 private Vector Order = null;
77 * @param anOrder Vector
79 public AlignmentOrder(Vector anOrder)
87 * @param orderFrom AlignmentI
89 public AlignmentOrder(AlignmentI orderFrom)
93 for (int i=0,ns=orderFrom.getHeight(); i<ns; i++)
94 Order.addElement(orderFrom.getSequenceAt(i));
96 public AlignmentOrder(SequenceI[] orderFrom) {
98 for (int i=0,ns=orderFrom.length; i<ns; i++)
99 Order.addElement(orderFrom[i]);
107 * @param orderThis AlignmentI
108 * @param byThat AlignmentI
110 /* public AlignmentOrder(AlignmentI orderThis, AlignmentI byThat)
112 // Vector is an ordering of this alignment using the order of sequence objects in byThat,
113 // where ids and unaligned sequences must match