Struct caffe2op_dataset::TreeWalker
source · pub struct TreeWalker<'a> { /* private fields */ }
Expand description
| Simple wrapper class allowing an easy | traversal of the tensors representing | the hirerarchical structure. |
Implementations§
source§impl<'a> TreeWalker<'a>
impl<'a> TreeWalker<'a>
pub fn input(&self, idx: i32) -> &TensorCPU
pub fn field(&self, idx: i32) -> &TreeIteratorFieldDesc
pub fn length_idx(&self, field_id: i32) -> i32
pub fn offset(&self, field_id: i32) -> TOffset
sourcepub fn fields(&self) -> &Vec<TreeWalkerField<'_>>
pub fn fields(&self) -> &Vec<TreeWalkerField<'_>>
| Notice that a reference is returned. | If advance() is called the fields will | be updated to represent the new state. |
pub fn new(inputs: &Vec<*const Blob>, cursor: &mut TreeCursor) -> Self
pub fn advance(&mut self)
pub fn field_dim(&self, field_id: i32) -> Vec<i64>
pub fn field_ptr(&self, field_id: i32) -> *mut c_void
pub fn gather_length_data(&mut self)
pub fn gather_size_limits(&mut self)
Auto Trait Implementations§
impl<'a> RefUnwindSafe for TreeWalker<'a>
impl<'a> !Send for TreeWalker<'a>
impl<'a> !Sync for TreeWalker<'a>
impl<'a> Unpin for TreeWalker<'a>
impl<'a> !UnwindSafe for TreeWalker<'a>
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.