Skip to content

Instantly share code, notes, and snippets.

@adamkewley
Created February 12, 2024 19:12
Show Gist options
  • Save adamkewley/e4f4fdb851ce362fa1ad9f033a47226b to your computer and use it in GitHub Desktop.
Save adamkewley/e4f4fdb851ce362fa1ad9f033a47226b to your computer and use it in GitHub Desktop.
83,95c83,84
< /**
< * Default constructor.<br>
< * <br>
< * @param aDefaultValue Default value of an array element. This value<br>
< * is used to initialize array elements as the size of the array is<br>
< * changed.<br>
< * @param aSize Initial size of the array. The array elements are<br>
< * initialized to aDefaultValue.<br>
< * @param aCapacity Initial capacity of the array. The initial capacity<br>
< * is guaranteed to be at least as large as aSize + 1.
< */
< public ArrayDouble(double aDefaultValue, int aSize, int aCapacity) {
< this(opensimCommonJNI.new_ArrayDouble__SWIG_0(aDefaultValue, aSize, aCapacity), true);
---
> public ArrayDouble(double defaultValue, int size, int capacity) {
> this(opensimCommonJNI.new_ArrayDouble__SWIG_0(defaultValue, size, capacity), true);
98,109c87,88
< /**
< * Default constructor.<br>
< * <br>
< * @param aDefaultValue Default value of an array element. This value<br>
< * is used to initialize array elements as the size of the array is<br>
< * changed.<br>
< * @param aSize Initial size of the array. The array elements are<br>
< * initialized to aDefaultValue.<br>
< *
< */
< public ArrayDouble(double aDefaultValue, int aSize) {
< this(opensimCommonJNI.new_ArrayDouble__SWIG_1(aDefaultValue, aSize), true);
---
> public ArrayDouble(double defaultValue, int size) {
> this(opensimCommonJNI.new_ArrayDouble__SWIG_1(defaultValue, size), true);
112,122c91,92
< /**
< * Default constructor.<br>
< * <br>
< * @param aDefaultValue Default value of an array element. This value<br>
< * is used to initialize array elements as the size of the array is<br>
< * changed.<br>
< * <br>
< *
< */
< public ArrayDouble(double aDefaultValue) {
< this(opensimCommonJNI.new_ArrayDouble__SWIG_2(aDefaultValue), true);
---
> public ArrayDouble(double defaultValue) {
> this(opensimCommonJNI.new_ArrayDouble__SWIG_2(defaultValue), true);
125,131d94
< /**
< * Default constructor.<br>
< * <br>
< * <br>
< * <br>
< *
< */
136,146c99,100
< /**
< * Copy constructor.<br>
< * <br>
< * @param aArray Array to be copied.
< */
< public ArrayDouble(ArrayDouble aArray) {
< this(opensimCommonJNI.new_ArrayDouble__SWIG_4(ArrayDouble.getCPtr(aArray), aArray), true);
< }
<
< public boolean arrayEquals(ArrayDouble aArray) {
< return opensimCommonJNI.ArrayDouble_arrayEquals(swigCPtr, this, ArrayDouble.getCPtr(aArray), aArray);
---
> public boolean arrayEquals(ArrayDouble other) {
> return opensimCommonJNI.ArrayDouble_arrayEquals(swigCPtr, this, ArrayDouble.getCPtr(other), other);
340,344c294,302
< * @param aFindFirst If true, find the first element that satisfies<br>
< * the search. If false, the index of any element that satisfies the<br>
< * search can be returned- which index will be returned depends on the<br>
< * length of the array and is therefore somewhat arbitrary. By default,<br>
< * this flag is false.<br>
---
> * @param aFindFirst DEPRECATED: this is now ALWAYS `true` - regardless of<br>
> * what you are calling it with. This makes the behavior predictable on all<br>
> * platforms.<br>
> * <br>
> * OLD BEHAVIOR: If true, find the first element that satisfies the search.<br>
> * OLD BEHAVIOR: If false, the index of any element that satisfies the<br>
> * search can be returned. Which index will be returned depends on the<br>
> * length of the array and is therefore somewhat arbitrary.<br>
> * OLD BEHAVIOR: By default, this flag is false (now: it is always true)<br>
348,352c306,308
< * than or equal to aValue. If there is more than one such elements with the<br>
< * same value and aFindFirst is set to true, the index of the first of<br>
< * these elements is returned. If an error is encountered (e.g., the array<br>
< * is empty), or the array contains no element that is less than or equal<br>
< * to aValue, -1 is returned.
---
> * than or equal to aValue. If an error is encountered (e.g., the array<br>
> * is empty), or if the array contains no element that is less than or<br>
> * equal to aValue, -1 is returned.
374,378c330,338
< * @param aFindFirst If true, find the first element that satisfies<br>
< * the search. If false, the index of any element that satisfies the<br>
< * search can be returned- which index will be returned depends on the<br>
< * length of the array and is therefore somewhat arbitrary. By default,<br>
< * this flag is false.<br>
---
> * @param aFindFirst DEPRECATED: this is now ALWAYS `true` - regardless of<br>
> * what you are calling it with. This makes the behavior predictable on all<br>
> * platforms.<br>
> * <br>
> * OLD BEHAVIOR: If true, find the first element that satisfies the search.<br>
> * OLD BEHAVIOR: If false, the index of any element that satisfies the<br>
> * search can be returned. Which index will be returned depends on the<br>
> * length of the array and is therefore somewhat arbitrary.<br>
> * OLD BEHAVIOR: By default, this flag is false (now: it is always true)<br>
382,386c342,344
< * than or equal to aValue. If there is more than one such elements with the<br>
< * same value and aFindFirst is set to true, the index of the first of<br>
< * these elements is returned. If an error is encountered (e.g., the array<br>
< * is empty), or the array contains no element that is less than or equal<br>
< * to aValue, -1 is returned.
---
> * than or equal to aValue. If an error is encountered (e.g., the array<br>
> * is empty), or if the array contains no element that is less than or<br>
> * equal to aValue, -1 is returned.
408,412c366,374
< * @param aFindFirst If true, find the first element that satisfies<br>
< * the search. If false, the index of any element that satisfies the<br>
< * search can be returned- which index will be returned depends on the<br>
< * length of the array and is therefore somewhat arbitrary. By default,<br>
< * this flag is false.<br>
---
> * @param aFindFirst DEPRECATED: this is now ALWAYS `true` - regardless of<br>
> * what you are calling it with. This makes the behavior predictable on all<br>
> * platforms.<br>
> * <br>
> * OLD BEHAVIOR: If true, find the first element that satisfies the search.<br>
> * OLD BEHAVIOR: If false, the index of any element that satisfies the<br>
> * search can be returned. Which index will be returned depends on the<br>
> * length of the array and is therefore somewhat arbitrary.<br>
> * OLD BEHAVIOR: By default, this flag is false (now: it is always true)<br>
416,420c378,380
< * than or equal to aValue. If there is more than one such elements with the<br>
< * same value and aFindFirst is set to true, the index of the first of<br>
< * these elements is returned. If an error is encountered (e.g., the array<br>
< * is empty), or the array contains no element that is less than or equal<br>
< * to aValue, -1 is returned.
---
> * than or equal to aValue. If an error is encountered (e.g., the array<br>
> * is empty), or if the array contains no element that is less than or<br>
> * equal to aValue, -1 is returned.
443a404,409
> * OLD BEHAVIOR: If true, find the first element that satisfies the search.<br>
> * OLD BEHAVIOR: If false, the index of any element that satisfies the<br>
> * search can be returned. Which index will be returned depends on the<br>
> * length of the array and is therefore somewhat arbitrary.<br>
> * OLD BEHAVIOR: By default, this flag is false (now: it is always true)<br>
> * <br>
446,450c412,414
< * than or equal to aValue. If there is more than one such elements with the<br>
< * same value and aFindFirst is set to true, the index of the first of<br>
< * these elements is returned. If an error is encountered (e.g., the array<br>
< * is empty), or the array contains no element that is less than or equal<br>
< * to aValue, -1 is returned.
---
> * than or equal to aValue. If an error is encountered (e.g., the array<br>
> * is empty), or if the array contains no element that is less than or<br>
> * equal to aValue, -1 is returned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment