|
||||||||
| 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
|
+--org.abora.white.collection.arrays.PrimFloatArray
|
+--org.abora.white.collection.arrays.IEEE32Array
Concrete fixed size array that holds elements of the Java float
floating-point primitive data type. This is conceptually associated with
the single-precision 32-bit format IEEE 754 values.
| Constructor Summary | |
protected |
IEEE32Array(float[] source)
Construct a new array of the same size as the specified source and containing a copy of its content. |
protected |
IEEE32Array(int count)
Construct a new array of the specified size with all elements initialized to zero. |
protected |
IEEE32Array(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
Construct a new array of the specified size with all elements initialized to zero. |
| Method Summary | |
protected void |
addData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
Arithmetic addition of the respective elements of other to this over the specified index range. |
int |
bitCount()
Return the maximum word size that can be stored in this array |
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. |
void |
copyToBuffer(float[] buffer,
int count,
int start)
Copy a consequitive range of elements from the receiver into the supplied buffer. |
int |
count()
Return the number of elements the array can hold. |
Heaper |
fetchValue(int index)
Fetch a value; may be a Heaper, null, or a PrimValue as appropriate to PrimArray subclass. |
double |
floatAt(int index)
Return the floating point number at the specified index. |
float |
iEEE32At(int index)
Return the floating point number at the specified index. |
static IEEE32Array |
make(float[] buffer)
create an IEEE32Array filled with the data at 'buffer' |
static IEEE32Array |
make(int count)
Return a new IEEE32Array of the specified size suitable for holding IEEE32 values, initially filled with zeros. |
static IEEE32Array |
make(int size,
PrimArray from)
|
static IEEE32Array |
make(int size,
PrimArray from,
int sourceOffset)
|
static IEEE32Array |
make(int size,
PrimArray from,
int sourceOffset,
int count)
|
static IEEE32Array |
make(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
create an IEEE32Array filled with the indicated data in 'from' |
static IEEE32Array |
make(PrimArray from)
|
protected PrimArray |
makeNew(int size,
PrimArray source,
int sourceOffset,
int count,
int destOffset)
Return a new array of the same type as this
initialized with the elements of source specified by
the index range, prepended by destOffset and postpended by
null or 0 elements. |
protected void |
printElementOn(int index,
java.io.PrintWriter oo)
Print a representation of the element at the given index. |
protected int |
signOfNonZeroAfter(int start)
Return the sign, -1 or +1, of the next non-zero element after start, or 0 if no such element. |
PrimSpec |
spec()
A description of the kinds of things which can be stored in this array |
void |
storeAll(Heaper value,
int count,
int start)
Fill a consequitive range of elements with the supplied value. |
void |
storeFloat(int index,
double value)
Store a floating point number at the specified index. |
void |
storeIEEE32(int index,
float value)
Store a floating point value at the specified index. |
void |
storeValue(int index,
Heaper value)
Store a value; may be a Heaper, null, or a PrimValue as appropriate to PrimArray subclass. |
protected void |
subtractData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
Subtract the respective elements of other from this over the given index range. |
| Methods inherited from class org.abora.white.collection.arrays.PrimFloatArray |
elementsHash, indexOf, indexPast, zeroElement |
| Methods inherited from class org.abora.white.collection.arrays.PrimArithmeticArray |
addElements, addElements, addElements, compare, compare, compare, compare, contentsEqual, elementsEqual, subtractElements, subtractElements, subtractElements |
| Methods inherited from class org.abora.white.collection.arrays.PrimArray |
contentsHash, copy, copy, copy, copy, copy, copyElements, copyGrow, elementsEqual, elementsEqual, elementsHash, elementsHash, getValue, indexOf, indexOf, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexPast, indexPast, isEqual, printOn, storeAll, storeAll, storeMany, storeMany, storeMany, 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 IEEE32Array(int count)
count - number of elements this will be able to hold
protected IEEE32Array(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
count - number of elements this will be able to holdprotected IEEE32Array(float[] source)
source - primitive array to copy| Method Detail |
protected PrimArray makeNew(int size,
PrimArray source,
int sourceOffset,
int count,
int destOffset)
PrimArraythis
initialized with the elements of source specified by
the index range, prepended by destOffset and postpended by
null or 0 elements.
makeNew in class PrimArraysize - size of new array.source - source of elements to be initialized with in the new array.sourceOffset - first index of the source array to be included in the range.count - number of elements of source to include in the new arraydestOffset - first index of new array to be initialized with source elements.
public static IEEE32Array make(int count)
count - number of elements this will be able to hold
public static IEEE32Array make(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
public static IEEE32Array make(int size,
PrimArray from,
int sourceOffset,
int count)
public static IEEE32Array make(int size,
PrimArray from,
int sourceOffset)
public static IEEE32Array make(int size,
PrimArray from)
public static IEEE32Array make(PrimArray from)
public static IEEE32Array make(float[] buffer)
public void storeIEEE32(int index,
float value)
value at the specified index.
index - index in array the element will be stored at.value - floating point value to store in this.public float iEEE32At(int index)
index.
index - 0 based index of this to read the number from.
public void storeFloat(int index,
double value)
PrimFloatArrayindex.
storeFloat in class PrimFloatArrayindex - 0 based index to store the value at.value - value to store in array, may lose precision if
array cant hold the full extent of it.public double floatAt(int index)
PrimFloatArrayindex.
floatAt in class PrimFloatArrayindex - 0 based index of this to read the number from.
public void storeValue(int index,
Heaper value)
PrimArraythis can hold.
It is expected that most PrimArray clients will want to use less abstract access methods
storeValue in class PrimArrayindex - index in array the element will be stored at.value - heaper to store in this.public Heaper fetchValue(int index)
PrimArrayIt is expected that most PrimArray clients will want to use less abstract access methods.
fetchValue in class PrimArrayindex - index in array whose element will be returned
index.public int count()
PrimArray
count in class PrimArraypublic PrimSpec spec()
PrimArray
spec in class PrimArraypublic int bitCount()
bitCount in class PrimFloatArray
public void storeAll(Heaper value,
int count,
int start)
PrimArrayvalue.
storeAll in class PrimArrayvalue - to store within range or 0.0 if null.count - number of consequentive elements in range or all
elements from start if -1.start - index of first element in range.
public void copyToBuffer(float[] buffer,
int count,
int start)
buffer - array to fill with receveirs elementscount - number of consequentive elements in range or all
elements from start if -1. Silently truncate if count is
larger than available elements in the receiverstart - index of first element in range
protected int compareData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
PrimArithmeticArray
compareData in class PrimFloatArrayprotected int signOfNonZeroAfter(int start)
PrimArithmeticArray
signOfNonZeroAfter in class PrimArithmeticArray
protected void addData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
PrimArithmeticArrayNote that arithmetic overflows aren't faulted.
Subclasses should override.
addData in class PrimFloatArray
protected void subtractData(int myStart,
PrimArithmeticArray other,
int otherStart,
int count)
PrimArithmeticArrayNote that arithmetic overflows aren't faulted.
Subclasses should override.
subtractData in class PrimFloatArray
protected void printElementOn(int index,
java.io.PrintWriter oo)
PrimArrayindex.
printElementOn in class PrimArrayindex - index of element to be printed.oo - print stream to write element representation to.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||