[][src]Struct goko::layer::CoverLayerReader

pub struct CoverLayerReader<D: PointCloud> { /* fields omitted */ }

Actual reader, primarily contains a read head to the hash-map. This also contains a reference to the scale_index so that it is easy to save and load. It is largely redundant, but helps with unit tests.

Implementations

impl<D: PointCloud> CoverLayerReader<D>[src]

pub fn get_node_and<F, T>(&self, pi: usize, f: F) -> Option<T> where
    F: FnOnce(&CoverNode<D>) -> T, 
[src]

Read only access to a single node.

pub fn get_node_plugin_and<T: Send + Sync + 'static, F, S>(
    &self,
    center_index: usize,
    transform_fn: F
) -> Option<S> where
    F: FnOnce(&T) -> S, 
[src]

Reads the contents of a plugin, due to the nature of the plugin map we have to access it with a closure.

pub fn for_each_node<F>(&self, f: F) where
    F: FnMut(&usize, &CoverNode<D>), 
[src]

Read only access to all nodes.

pub fn map_nodes<Map, Target, Collector>(&self, f: Map) -> Collector where
    Map: FnMut(&usize, &CoverNode<D>) -> Target,
    Collector: FromIterator<Target>, 
[src]

Maps all nodes on the layer, useful for collecting statistics.

pub fn get_node_children_and<F, T>(&self, pi: usize, f: F) -> Option<T> where
    F: FnOnce(NodeAddress, &[NodeAddress]) -> T, 
[src]

Grabs all children indexes and allows you to query against them. Usually used at the tree level so that you can access the child nodes as they are not on this layer.

pub fn node_center_indexes(&self) -> Vec<usize>[src]

Grabs all children indexes and allows you to query against them. Usually used at the tree level so that you can access the child nodes as they are not on this layer.

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

Total number of nodes on this layer

pub fn is_empty(&self) -> bool[src]

Total number of nodes on this layer

pub fn scale_index(&self) -> i32[src]

Read only accessor for the scale index.

pub fn reader(&self) -> CoverLayerReader<D>[src]

Clones the reader, expensive!

Trait Implementations

impl<D: PointCloud> Clone for CoverLayerReader<D>[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

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

impl<T> FromCast<T> for T

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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<V, T> VZip<V> for T where
    V: MultiLane<T>,