From: gmungoc Date: Thu, 17 Nov 2016 11:50:44 +0000 (+0000) Subject: JAL-98 javadoc, third party acknowledgements (and very small code X-Git-Tag: Release_2_10_1~11^2^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fc75b80aa07137161c63456c0b69999e80f164d1;p=jalview.git JAL-98 javadoc, third party acknowledgements (and very small code change) --- diff --git a/THIRDPARTYLIBS b/THIRDPARTYLIBS index 7d12783..85aa587 100644 --- a/THIRDPARTYLIBS +++ b/THIRDPARTYLIBS @@ -6,8 +6,11 @@ A number of sources have also been adapted for incorporation into Jalview's sour ext.edu.ucsf.rbvi.strucviz2 includes sources originally developed by Scooter Morris and Nadezhda Doncheva for the Cytoscape StructureViz2 plugin. It is released under the Berkley license and we hereby acknowledge its original copyright is held by the UCSF Computer Graphics Laboratory and the software was developed with support by the NIH National Center for Research Resources, grant P41-RR01081. + + jalview.ext.android includes code taken from the Android Open Source Project (https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/util). + The Apache 2.0 Licence (http://www.apache.org/licenses/LICENSE-2.0) is acknowledged in the source code. -Licencing information for each library is given below: +Licensing information for each library is given below: JGoogleAnalytics_0.3.jar APL 2.0 License - http://code.google.com/p/jgoogleanalytics/ Jmol-14.2.14_2015.06.11.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/ diff --git a/src/jalview/ext/android/ContainerHelpers.java b/src/jalview/ext/android/ContainerHelpers.java index f536819..4033dcc 100644 --- a/src/jalview/ext/android/ContainerHelpers.java +++ b/src/jalview/ext/android/ContainerHelpers.java @@ -16,6 +16,12 @@ package jalview.ext.android; * limitations under the License. */ +/* + * Copied to Jalview September 2016. + * Only the members of this class required for SparseIntArray were copied. + * Method binarySearch(short[] array, int size, short value) added to support + * SparseShortArray. + */ class ContainerHelpers { static final boolean[] EMPTY_BOOLEANS = new boolean[0]; @@ -83,7 +89,7 @@ class ContainerHelpers while (lo <= hi) { final int mid = (lo + hi) >>> 1; - final int midVal = array[mid]; + final short midVal = array[mid]; if (midVal < value) { lo = mid + 1; diff --git a/src/jalview/ext/android/SparseIntArray.java b/src/jalview/ext/android/SparseIntArray.java index 2b9c4af..fcd4f1f 100644 --- a/src/jalview/ext/android/SparseIntArray.java +++ b/src/jalview/ext/android/SparseIntArray.java @@ -40,6 +40,13 @@ package jalview.ext.android; * order in the case of valueAt(int). *

*/ + +/* + * Imported into Jalview September 2016 + * Change log: + * Sep 2016 method add(int, int) added for more efficient increment of counts + * (a single binary search, rather than one on read and one on write) + */ public class SparseIntArray implements Cloneable { private int[] mKeys; diff --git a/src/jalview/ext/android/SparseShortArray.java b/src/jalview/ext/android/SparseShortArray.java index 375d745..f961f55 100644 --- a/src/jalview/ext/android/SparseShortArray.java +++ b/src/jalview/ext/android/SparseShortArray.java @@ -40,12 +40,15 @@ package jalview.ext.android; * order in the case of valueAt(int). *

*/ -/** - * A copy of SparseShortArray designed to store short values (to minimise space - * usage). + +/* + * Added to Jalview September 2016. A copy of SparseIntArray designed to store + * short values (to minimise space usage). *

- * Note that operations append, put, add throw ArithmeticException if the - * resulting value overflows the range of a short. + * Note that operations append, put, add throw ArithmeticException if either the + * key or the resulting value overflows the range of a short. Calling code + * should trap and handle this, for example by switching to using a + * SparseIntArray instead. */ public class SparseShortArray implements Cloneable {