Struct imbe::enhance::EnhancedSpectrals [] [src]

pub struct EnhancedSpectrals(_);

Enhanced spectral amplitudes, "overbar" Ml, are derived from the decoded spectral amplitudes, "tilde" Ml.

Methods

impl EnhancedSpectrals
[src]

[src]

Create a new EnhancedSpectrals from the given base spectral amplitudes Ml and current frame energy values and parameters.

[src]

Retrieve the enhanced spectral amplitude Ml, 1 ≤ l ≤ L.

Methods from Deref<Target = ArrayVec<[f32; 56]>>

[src]

Return the number of elements in the ArrayVec.

use arrayvec::ArrayVec;

let mut array = ArrayVec::from([1, 2, 3]);
array.pop();
assert_eq!(array.len(), 2);

[src]

Return the capacity of the ArrayVec.

use arrayvec::ArrayVec;

let array = ArrayVec::from([1, 2, 3]);
assert_eq!(array.capacity(), 3);

[src]

Return if the ArrayVec is completely filled.

use arrayvec::ArrayVec;

let mut array = ArrayVec::<[_; 1]>::new();
assert!(!array.is_full());
array.push(1);
assert!(array.is_full());

[src]

Push element to the end of the vector.

Return None if the push succeeds, or and return Some( element ) if the vector is full.

use arrayvec::ArrayVec;

let mut array = ArrayVec::<[_; 2]>::new();

array.push(1);
array.push(2);
let overflow = array.push(3);

assert_eq!(&array[..], &[1, 2]);
assert_eq!(overflow, Some(3));

[src]

Insert element in position index.

Shift up all elements after index. If any is pushed out, it is returned.

Return None if no element is shifted out.

index must be <= self.len() and < self.capacity(). Note that any out of bounds index insert results in the element being "shifted out" and returned directly.

use arrayvec::ArrayVec;

let mut array = ArrayVec::<[_; 2]>::new();

assert_eq!(array.insert(0, "x"), None);
assert_eq!(array.insert(0, "y"), None);
assert_eq!(array.insert(0, "z"), Some("x"));
assert_eq!(array.insert(1, "w"), Some("y"));
assert_eq!(&array[..], &["z", "w"]);

[src]

Remove the last element in the vector.

Return Some( element ) if the vector is non-empty, else None.

use arrayvec::ArrayVec;

let mut array = ArrayVec::<[_; 2]>::new();

array.push(1);

assert_eq!(array.pop(), Some(1));
assert_eq!(array.pop(), None);

[src]

Remove the element at index and swap the last element into its place.

This operation is O(1).

Return Some( element ) if the index is in bounds, else None.

use arrayvec::ArrayVec;

let mut array = ArrayVec::from([1, 2, 3]);

assert_eq!(array.swap_remove(0), Some(1));
assert_eq!(&array[..], &[3, 2]);

assert_eq!(array.swap_remove(10), None);

[src]

Remove the element at index and shift down the following elements.

Return Some( element ) if the index is in bounds, else None.

use arrayvec::ArrayVec;

let mut array = ArrayVec::from([1, 2, 3]);

assert_eq!(array.remove(0), Some(1));
assert_eq!(&array[..], &[2, 3]);

assert_eq!(array.remove(10), None);

[src]

Remove all elements in the vector.

[src]

Retains only the elements specified by the predicate.

In other words, remove all elements e such that f(&mut e) returns false. This method operates in place and preserves the order of the retained elements.

use arrayvec::ArrayVec;

let mut array = ArrayVec::from([1, 2, 3, 4]);
array.retain(|x| *x & 1 != 0 );
assert_eq!(&array[..], &[1, 3]);

[src]

Set the vector's length without dropping or moving out elements

May panic if length is greater than the capacity.

This function is unsafe because it changes the notion of the number of “valid” elements in the vector. Use with care.

Important traits for Drain<'a, A>
[src]

Create a draining iterator that removes the specified range in the vector and yields the removed items from start to end. The element range is removed even if the iterator is not consumed until the end.

Note: It is unspecified how many elements are removed from the vector, if the Drain value is leaked.

Panics if the starting point is greater than the end point or if the end point is greater than the length of the vector.

use arrayvec::ArrayVec;

let mut v = ArrayVec::from([1, 2, 3]);
let u: Vec<_> = v.drain(0..2).collect();
assert_eq!(&v[..], &[3]);
assert_eq!(&u[..], &[1, 2]);

[src]

Return a slice containing all elements of the vector.

[src]

Return a mutable slice containing all elements of the vector.

Trait Implementations

impl Clone for EnhancedSpectrals
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Deref for EnhancedSpectrals
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl DerefMut for EnhancedSpectrals
[src]

[src]

Mutably dereferences the value.

impl Default for EnhancedSpectrals
[src]

[src]

Create a new EnhancedSpectrals with default initial values.