|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.white.xpp.basic.Heaper
|
+--org.abora.white.collection.arrays.PrimArray
|
+--org.abora.white.collection.arrays.PrimArithmeticArray
A common superclass for primitive arrays of arithmetic values such as floats and integers.
| Constructor Summary | |
protected |
PrimArithmeticArray()
Construct a new array. |
| Method Summary | |
protected void |
addData(int start,
PrimArithmeticArray other,
int otherStart,
int count)
Arithmetic addition of the respective elements of other to this over the specified index range. |
void |
addElements(int to,
PrimArithmeticArray other)
Arithmetic addition of the respective elements of other to this over the index range |
void |
addElements(int to,
PrimArithmeticArray other,
int count)
Arithmetic addition of the respective elements of other to this over the specified index range. |
void |
addElements(int to,
PrimArithmeticArray other,
int count,
int from)
Arithmetic addition of the respective elements of other to this over the specified index range. |
int |
compare(PrimArithmeticArray other)
|
int |
compare(PrimArithmeticArray other,
int count)
|
int |
compare(PrimArithmeticArray other,
int count,
int here)
|
int |
compare(PrimArithmeticArray other,
int count,
int here,
int there)
Return -1, 0, or +1 according to whether the elements in the specified span of this array are lexically less than, equal to, or greater than the specified span of the other. |
protected int |
compareData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
Over given range, returns - if this < other; 0 if this == other; + if this > other. |
boolean |
contentsEqual(PrimArray other)
Whether the two ranges contain semantically the same values. |
boolean |
elementsEqual(int here,
PrimArray other,
int there,
int count)
Whether the two ranges contain the same values, using the criteria defined in contentsEqual |
protected abstract int |
signOfNonZeroAfter(int start)
Return the sign, -1 or +1, of the next non-zero element after start, or 0 if no such element. |
protected void |
subtractData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
Subtract the respective elements of other from this over the given index range. |
void |
subtractElements(int to,
PrimArithmeticArray other)
Arithmetic subtraction of the respective elements of other from this over the specified index range. |
void |
subtractElements(int to,
PrimArithmeticArray other,
int count)
Arithmetic subtraction of the respective elements of other from this over the specified index range. |
void |
subtractElements(int to,
PrimArithmeticArray other,
int count,
int from)
Arithmetic subtraction of the respective elements of other from this over the specified index range. |
| Methods inherited from class org.abora.white.collection.arrays.PrimArray |
contentsHash, copy, copy, copy, copy, copy, copyElements, copyGrow, count, elementsEqual, elementsEqual, elementsHash, elementsHash, elementsHash, fetchValue, getValue, indexOf, indexOf, indexOf, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexPast, indexPast, indexPast, isEqual, makeNew, printElementOn, printOn, spec, storeAll, storeAll, storeAll, storeMany, storeMany, storeMany, storeValue, zeroElement, zeroElements, zeroElements, zeroElements |
| Methods inherited from class org.abora.white.xpp.basic.Heaper |
actualHashForEqual, destroy, destruct, equals, hashForEqual, printContentsOn, sendSelfTo, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected PrimArithmeticArray()
| Method Detail |
public void addElements(int to,
PrimArithmeticArray other,
int count,
int from)
Note that arithmetic overflows aren't faulted.
to - first index of receiver to be includedother - other elements to be added to the receivers elementscount - number of elements from the other array included in range, or -1 for
all others elements starting at from and after. Fail if count is
greater than number of elements in range.from - first index of the other array to be included in the range
public void addElements(int to,
PrimArithmeticArray other,
int count)
to - first index of receiver to be includedother - other elements to be added to the receivers elementscount - number of elements from the other array included in range, or -1 for
all of others elements starting at from and after. Fail if count is
greater than number of elements in range.
public void addElements(int to,
PrimArithmeticArray other)
to - first index of receiver to be includedother - other elements to be added to the receivers elements
protected void addData(int start,
PrimArithmeticArray other,
int otherStart,
int count)
Note that arithmetic overflows aren't faulted.
Subclasses should override.
public void subtractElements(int to,
PrimArithmeticArray other,
int count,
int from)
Note that arithmetic overflows aren't faulted.
to - first index of receiver to be includedother - other elements to be subtracted from the receivers elementscount - number of elements from the other array included in range, or -1 for
all of others elements starting at from and after. Fail if count is
greater than number of elements in range.from - first index of the other array to be included
public void subtractElements(int to,
PrimArithmeticArray other,
int count)
to - first index of receiver to be includedother - other elements to be subtracted from the receivers elementscount - number of elements from the other array included in range, or -1 for
all of others elements starting at from and after. Fail if count is
greater than number of elements in range.
public void subtractElements(int to,
PrimArithmeticArray other)
to - first index of receiver to be includedother - other elements to be subtracted from the receivers elements
protected void subtractData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
Note that arithmetic overflows aren't faulted.
Subclasses should override.
public int compare(PrimArithmeticArray other,
int count,
int here,
int there)
NOTE: Because of zero extension, this is not the same as elementsEqual; it is possible that a->compare (b) == 0 even though ! a->contentsEqual (b)
other - elements to compare the receivers elements againstcount - number of elements in span to consider, or -1 for all elements
after here and there. Zero elements are used to extend if there are
insufficient elements in either array to fullfill the count.here - inclusive start index of the receivers spanthere - inclusive start index of the other arrays span
public int compare(PrimArithmeticArray other,
int count,
int here)
public int compare(PrimArithmeticArray other,
int count)
public int compare(PrimArithmeticArray other)
protected abstract int signOfNonZeroAfter(int start)
public boolean contentsEqual(PrimArray other)
PrimArray
contentsEqual in class PrimArray
public boolean elementsEqual(int here,
PrimArray other,
int there,
int count)
PrimArray
elementsEqual in class PrimArray
protected int compareData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||