From 8906ee1e7c76cc694793097abbb0fefe4434bb5a Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 21 Aug 2006 12:43:39 +0000 Subject: [PATCH] inverse ShiftList and SequenceI.gapMap->ShiftList methods. --- src/jalview/util/ShiftList.java | 185 +++++++++++++++++++++++---------------- 1 file changed, 111 insertions(+), 74 deletions(-) diff --git a/src/jalview/util/ShiftList.java b/src/jalview/util/ShiftList.java index 905b098..78b99ef 100644 --- a/src/jalview/util/ShiftList.java +++ b/src/jalview/util/ShiftList.java @@ -1,74 +1,111 @@ -package jalview.util; - -import java.util.*; - -/** - * ShiftList - * Simple way of mapping a linear series to a new linear range with new points introduced. - * Use at your own risk! - *

Title: ShiftList

- * - *

Description:

- * - *

Copyright: Copyright (c) 2004

- * - *

Company: Dundee University

- * - * @author not attributable - * @version 1.0 - */ -public class ShiftList -{ - Vector shifts; - public ShiftList() - { - shifts = new Vector(); - } - - /** - * addShift - * @param pos start position for shift (in original reference frame) - * @param shift length of shift - */ - public void addShift(int pos, int shift) - { - int sidx = 0; - int[] rshift=null; - while (sidxTitle: ShiftList

+ * + *

Description:

+ * + *

Copyright: Copyright (c) 2004

+ * + *

Company: Dundee University

+ * + * @author not attributable + * @version 1.0 + */ +public class ShiftList +{ + public Vector shifts; + public ShiftList() + { + shifts = new Vector(); + } + + /** + * addShift + * @param pos start position for shift (in original reference frame) + * @param shift length of shift + */ + public void addShift(int pos, int shift) + { + int sidx = 0; + int[] rshift=null; + while (sidx0) { + shiftList=new ShiftList(); + + for (int i=0,p=0; i