back to index



Object -> FloatArray


numElements - - number of used elements 
maxElements - - number of available elements 


        add            (float _f)                          - add element to end of array (elements[numElements++])
        addEmpty       (int _num)                          - increase numElements by _num
int     alloc          (int _num)                          - allocate _num elements, discard previous elements
        blend          (FloatArray _o, float _f)           - blend elements from this and _b
        blendAB        (FloatArray _a, FloatArray _b, float _bamount)   - blend elements from _a and _b and store in this array
boolean contains       (float _f)                          - return true if array contains a value which is ~=_f (YAC_FLOAT_DEVIATION)
        copyFrom       (FloatArray _src, int _off, int _len, int _doff) - copy elements from array _src
        delete         (int _idx)                          - delete element at index _idx
        empty          ()                                  - numElements=0;
        fill           (float _f)                          - set all elements to _f
        free           ()                                  - discard elements
sF32    get            (int _index)                        - safe-get value at index, silently return 0 if value was not found
int     getAbsMax      ();                                 - return the sign-independent highest value. 0 if array is empty.
float   getAbsMean     ();                                 - return the sign-independent arithmetic mean. 0 if array is empty.
int     getAbsMin      ();                                 - return the sign-independent lowest value. 0 if array is empty. 
int     getMax         ();                                 - return the highest value. 0 if array is empty.
floa t  getMean        ();                                 - return the arithmetic mean. 0 if array is empty.
int     getMin         ();                                 - return the lowest value. 0 if array is empty.
int     getNumElements ()                                  - return number of used elements
int     getMaxElements ()                                  - return number of avaiable elements
String  getString      ()                                  - convert array to string representation
        insert         (int _idx, float _f)                - insert element _f at index _idx
int     read32         (Stream _ifs, int _num, int _doff)  - read _num 32bit floats from stream
int     read64         (Stream _ifs, int _num, int _doff)  - read _num 64bit doubles from stream and convert to floats
        realloc        (int _num)                          - resize array. preserve elements if _num>maxElements
int     rearrange      (IntArray _ia)                      - rearrange elements according to indices in _ia
        reverse        ()                                  - reverse element order
        scale          (FloatArray _src, float _s)         - scale all elements of _src by _s and store in this array
        setNumElements (int _num)                          - set number of used elements
        sortByValue    (IntArray _ia)                      - sort elements and write new element-order to _ia. reallocates _ia.
boolean swap           (int _idxa, _idb)                   - swap elements 
        visit          (FloatArray _o, int _off, int _len) - create a "view" into another FloatArray (no elements copied)
float   winCosine      (float _index)                      - return value at cosine interpolated index
float   winCubic       (float _index)                      - return value at cubic interpolated index
float   winLinear      (float _index)                      - return value at linear interpolated index
float   winQuadratic   (float _index)                      - return value at quadratic interpolated index
float   winQuintic     (float _index)                      - return value at quintic interpolated index
int     write32        (Stream _ofs, int _num, int _soff)  - write _num 32bit floats to stream
int     write64        (Stream _ofs, int _num, int _soff)  - convert 32bit floats to 64bit doubles and write to stream


back to index