[−][src]Trait flatk::Set
A trait defining a raw buffer of data. This data is typed but not annotated so it can represent anything. For example a buffer of floats can represent a set of vertex colours or vertex positions.
Associated Types
type Elem
Owned element of the set.
type Atom
The most basic element contained by this collection.
If this collection contains other collections, this type should be
different than Elem
.
Required methods
Loading content...Provided methods
Loading content...Implementations on Foreign Types
impl<T> Set for [T; 1]
[src]
impl<T> Set for [T; 2]
[src]
impl<T> Set for [T; 3]
[src]
impl<T> Set for [T; 4]
[src]
impl<T> Set for [T; 5]
[src]
impl<T> Set for [T; 6]
[src]
impl<T> Set for [T; 7]
[src]
impl<T> Set for [T; 8]
[src]
impl<T> Set for [T; 9]
[src]
impl<T> Set for [T; 10]
[src]
impl<T> Set for [T; 11]
[src]
impl<T> Set for [T; 12]
[src]
impl<T> Set for [T; 13]
[src]
impl<T> Set for [T; 14]
[src]
impl<T> Set for [T; 15]
[src]
impl<T> Set for [T; 16]
[src]
impl<S: Set> Set for Box<S>
[src]
impl<I: IntBound> Set for Range<I>
[src]
impl<I: IntBound> Set for RangeInclusive<I>
[src]
impl<I: IntBound> Set for RangeTo<I>
[src]
impl<I: IntBound> Set for RangeToInclusive<I>
[src]
impl<T> Set for [T]
[src]
impl<S: Set, T: Set> Set for (S, T)
[src]
impl<T> Set for Vec<T>
[src]
impl<'_, S: Set + ?Sized> Set for &'_ S
[src]
impl<'_, S: Set + ?Sized> Set for &'_ mut S
[src]
impl<'_, S: Set + ?Sized> Set for Ref<'_, S>
[src]
impl<'_, S: Set + ?Sized> Set for RefMut<'_, S>
[src]
Loading content...
Implementors
impl<N: Unsigned> Set for StaticRange<N>
[src]
impl<O: Set> Set for Offsets<O>
[src]
impl<O: Set> Set for SortedChunks<O>
[src]
impl<S, O> Set for Chunked<S, O> where
S: Set,
O: Set,
[src]
S: Set,
O: Set,
type Elem = Vec<S::Elem>
type Atom = S::Atom
fn len(&self) -> usize
[src]
Get the number of elements in a Chunked
.
Example
use flatk::*; let s = Chunked::from_offsets(vec![0,3,4,6], vec![1,2,3,4,5,6]); assert_eq!(3, s.len());
impl<S: Set + UniChunkable<N>, N: Unsigned> Set for UniChunked<S, U<N>>
[src]
An implementation of Set
for a UniChunked
collection of any type that
can be grouped as N
sub-elements.
type Elem = S::Chunk
type Atom = S::Atom
fn len(&self) -> usize
[src]
Compute the length of this UniChunked
collection as the number of
grouped elements in the set.
Example
use flatk::*; let s = UniChunked::<_, U2>::from_flat(vec![0,1,2,3,4,5]); assert_eq!(s.len(), 3); let s = UniChunked::<_, U3>::from_flat(vec![0,1,2,3,4,5]); assert_eq!(s.len(), 2);
impl<S: Set> Set for ChunkedN<S>
[src]
An implementation of Set
for a UniChunked
collection of any type that
can be grouped into sub-elements whose size is determined at run-time.
type Elem = Vec<S::Elem>
type Atom = S::Atom
fn len(&self) -> usize
[src]
Compute the length of this UniChunked
collection as the number of
grouped elements in the set.
Example
use flatk::*; let s = ChunkedN::from_flat_with_stride(vec![0,1,2,3,4,5], 2); assert_eq!(s.len(), 3); let s = ChunkedN::from_flat_with_stride(vec![0,1,2,3,4,5], 3); assert_eq!(s.len(), 2);
impl<S: Set, I: AsRef<[usize]>> Set for Select<S, I>
[src]
type Elem = S::Elem
type Atom = S::Atom
fn len(&self) -> usize
[src]
Get the number of selected elements.
Example
use flatk::*; let v = vec![1,2,3,4,5]; let selection = Select::new(vec![4,0,1,4], v.as_slice()); assert_eq!(4, selection.len());
impl<S: Set, I: AsRef<[usize]>> Set for Subset<S, I>
[src]
Required for Chunked
and UniChunked
subsets.
type Elem = S::Elem
type Atom = S::Atom
fn len(&self) -> usize
[src]
Get the length of this subset.
Example
use flatk::*; let v = vec![1,2,3,4,5]; let subset = Subset::from_indices(vec![0,2,4], v.as_slice()); assert_eq!(3, subset.len());