# Trait flechasdb::vector::VectorSet

source ·

    pub trait VectorSet<T> {
        type Vector: ?Sized + AsSlice<T>;

        // Required methods
        fn len(&self) -> usize;
        fn vector_size(&self) -> usize;
        fn get(&self, i: usize) -> &Self::Vector;
    }

Expand description

Set of vectors of the same size.

## Required Associated Types§

source

#### type Vector: ?Sized + AsSlice<T>

Vector type.

Supposed to be a slice or a Vec.

## Required Methods§

source

#### fn len(&self) -> usize

Returns the number of vectors in the set.

source

#### fn vector_size(&self) -> usize

Returns the size of each vector.

source

#### fn get(&self, i: usize) -> &Self::Vector

Returns the i-th vector.

## Implementors§

source§

### impl<'a, T, VS> VectorSet<T> for SubVectorSet<'a, T, VS>where VS: VectorSet<T>,

§

#### type Vector = [T]

source§

### impl<T> VectorSet<T> for BlockVectorSet<T>

§

#### type Vector = [T]