gnu.lists

Class F64Vector

Implemented Interfaces:
Comparable, Externalizable, java.util.List, Array, Consumable, Sequence

public class F64Vector
extends SimpleVector
implements Externalizable, Comparable

Simple adjustable-length vector whose elements are 64-bit floats.

Field Summary

protected static double[]
empty

Fields inherited from class gnu.lists.SimpleVector

size

Fields inherited from interface gnu.lists.Sequence

ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE, eofValue

Constructor Summary

F64Vector()
F64Vector(double[] data)
F64Vector(Sequence seq)
F64Vector(int size)
F64Vector(int size, double value)

Method Summary

protected void
clearBuffer(int start, int count)
int
compareTo(Object obj)
boolean
consumeNext(int ipos, Consumer out)
Copy an element specified by a position pair to a Consumer.
void
consumePosRange(int iposStart, int iposEnd, Consumer out)
double
doubleAt(int index)
double
doubleAtBuffer(int index)
Object
get(int index)
See java.util.List.
protected Object
getBuffer()
Object
getBuffer(int index)
int
getBufferLength()
Get the allocated length of the data buffer.
int
getElementKind()
String
getTag()
This is convenience hack for printing "uniform vectors" (srfi 4).
int
intAtBuffer(int index)
void
readExternal(ObjectInput in)
Object
setBuffer(int index, Object value)
void
setBufferLength(int length)
void
setDoubleAt(int index, double value)
void
setDoubleAtBuffer(int index, double value)
void
writeExternal(ObjectOutput out)

Methods inherited from class gnu.lists.SimpleVector

add, add, addAll, addPos, clear, clearBuffer, compareToInt, compareToLong, consume, consumeNext, consumePosRange, createPos, fill, fill, fillPosRange, get, getBuffer, getBuffer, getBufferLength, getElementKind, getNextKind, getPosNext, getRowMajor, getTag, intAt, intAtBuffer, isAfterPos, longAt, longAtBuffer, nextIndex, nextPos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, setBuffer, setBufferLength, setSize, shift, size, transpose

Methods inherited from class gnu.lists.AbstractSequence

add, add, addAll, addAll, addPos, clear, compare, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createPos, createRelativePos, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasNext, hasPrevious, hashCode, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setPosNext, setPosPrevious, size, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedException

Field Details

empty

protected static double[] empty

Constructor Details

F64Vector

public F64Vector()

F64Vector

public F64Vector(double[] data)

F64Vector

public F64Vector(Sequence seq)

F64Vector

public F64Vector(int size)

F64Vector

public F64Vector(int size,
                 double value)

Method Details

clearBuffer

protected void clearBuffer(int start,
                           int count)
Overrides:
clearBuffer in interface SimpleVector

compareTo

public int compareTo(Object obj)

consumeNext

public boolean consumeNext(int ipos,
                           Consumer out)
Copy an element specified by a position pair to a Consumer.
Overrides:
consumeNext in interface SimpleVector
Returns:
if hasNext(ipos).

consumePosRange

public void consumePosRange(int iposStart,
                            int iposEnd,
                            Consumer out)
Overrides:
consumePosRange in interface SimpleVector

doubleAt

public final double doubleAt(int index)

doubleAtBuffer

public final double doubleAtBuffer(int index)

get

public final Object get(int index)
See java.util.List.
Specified by:
get in interface Sequence
Overrides:
get in interface SimpleVector

getBuffer

protected Object getBuffer()
Overrides:
getBuffer in interface SimpleVector

getBuffer

public final Object getBuffer(int index)
Overrides:
getBuffer in interface SimpleVector

getBufferLength

public int getBufferLength()
Get the allocated length of the data buffer.
Overrides:
getBufferLength in interface SimpleVector

getElementKind

public int getElementKind()
Overrides:
getElementKind in interface SimpleVector

getTag

public String getTag()
This is convenience hack for printing "uniform vectors" (srfi 4). It may go away without notice!
Overrides:
getTag in interface SimpleVector

intAtBuffer

public final int intAtBuffer(int index)
Overrides:
intAtBuffer in interface SimpleVector

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException

setBuffer

public final Object setBuffer(int index,
                              Object value)
Overrides:
setBuffer in interface SimpleVector

setBufferLength

public void setBufferLength(int length)
Overrides:
setBufferLength in interface SimpleVector

setDoubleAt

public final void setDoubleAt(int index,
                              double value)

setDoubleAtBuffer

public final void setDoubleAtBuffer(int index,
                                    double value)

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException