[][src]Struct intarray::IntArray

pub struct IntArray {
    pub bits: usize,
    pub length: usize,
    // some fields omitted
}

1-64 bits unsigned integer array

Fields

bits: usize

bit width

length: usize

number of element

Methods

impl IntArray[src]

pub fn new(b: usize, len: usize) -> IntArray[src]

pub fn new_with_vec(b: usize, vals: Vec<u64>) -> IntArray[src]

pub fn new_with_iter<'a, I>(b: usize, vals: I) -> IntArray where
    I: Iterator<Item = u64>, 
[src]

pub fn subarray<'a>(&'a self, offset: usize, length: usize) -> IntArray[src]

pub fn datasize(self) -> usize[src]

pub fn push(&mut self, v: u64) -> Option<usize>[src]

pub fn extend<I>(&mut self, vals: I) where
    I: Iterator<Item = u64>, 
[src]

pub fn extend_array(&mut self, vals: IntArray)[src]

pub fn concat(&mut self, vals: IntArray)[src]

pub fn shape<'a>(self: &'a IntArray, bits: usize) -> IntArray[src]

pub fn shape_auto<'a>(self: &'a IntArray) -> IntArray[src]

pub fn pop(&mut self) -> Result<u64, String>[src]

Important traits for IntIter<'a>
pub fn iter(&self) -> IntIter[src]

pub fn capacity(&self) -> usize[src]

pub fn resize(&mut self, len: usize)[src]

pub fn len(&self) -> usize[src]

pub fn max_value(&self) -> u64[src]

pub fn max(&self) -> u64[src]

pub fn min(&self) -> u64[src]

pub fn average(&self) -> f64[src]

pub fn get(&self, i: usize) -> Result<u64, String>[src]

pub fn set(&mut self, i: usize, v: u64) -> Result<u64, String>[src]

pub fn add(&mut self, i: usize, v: u64) -> Result<u64, String>[src]

pub fn sub(&mut self, i: usize, v: u64) -> Result<u64, String>[src]

pub fn incr_limit(&mut self, i: usize) -> Option<u64>[src]

pub fn decr_limit(&mut self, i: usize) -> Option<u64>[src]

pub fn incr(&mut self, i: usize) -> Result<u64, String>[src]

pub fn decr(&mut self, i: usize) -> Result<u64, String>[src]

pub fn sum<'a>(&'a self) -> Option<u64>[src]

pub fn sum0<'a>(&'a self) -> Option<u64>[src]

pub fn fill_random(&mut self)[src]

Trait Implementations

impl Clone for IntArray[src]

impl Display for IntArray[src]

impl AddAssign<u64> for IntArray[src]

impl AddAssign<IntArray> for IntArray[src]

impl SubAssign<u64> for IntArray[src]

impl SubAssign<IntArray> for IntArray[src]

impl MulAssign<u64> for IntArray[src]

impl Serialize for IntArray[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,