Struct caffe2op_dataset::TreeIterator
source · pub struct TreeIterator { /* private fields */ }
Expand description
| Provides functionality to iterate | across a list of tensors where some of | those tensors represent lengths in | a hierarchical structure. |
Implementations§
source§impl TreeIterator
impl TreeIterator
sourcepub fn num_length_fields(&self) -> i32
pub fn num_length_fields(&self) -> i32
| Corresponds to the number of fields | that have “length” as its last name |
sourcepub fn num_offset_fields(&self) -> i32
pub fn num_offset_fields(&self) -> i32
| Corresponds to the number of length | fields + 1 (for the top-level domain) |
sourcepub fn length_field_for(
&mut self,
desc: &TreeIteratorFieldDesc
) -> *const TreeIteratorFieldDesc
pub fn length_field_for( &mut self, desc: &TreeIteratorFieldDesc ) -> *const TreeIteratorFieldDesc
| Get lengthField description for the | given field |
sourcepub fn length_field(&mut self, length_field_id: i32) -> &TreeIteratorFieldDesc
pub fn length_field(&mut self, length_field_id: i32) -> &TreeIteratorFieldDesc
| Get lengthField description for the | given lengthFieldId, where 0 <= lengthFieldId | < numLengthFields() |
sourcepub fn offset_field_id_for(&mut self, field_desc: &TreeIteratorFieldDesc) -> i32
pub fn offset_field_id_for(&mut self, field_desc: &TreeIteratorFieldDesc) -> i32
| Returns the index into the ‘offset’ | vector for the given field. |
sourcepub fn fields(&mut self) -> &Vec<TreeIteratorFieldDesc>
pub fn fields(&mut self) -> &Vec<TreeIteratorFieldDesc>
| Returns the field description for all | fields. |
pub fn length_field_ids(&self) -> &Vec<i32>
pub fn new(fields: &Vec<String>) -> Self
pub fn advance( &mut self, lengths: &Vec<*const TLength>, offsets: &mut Vec<TOffset>, sizes: &mut Vec<TOffset>, limits: &mut Vec<TOffset>, num: TOffset )
Auto Trait Implementations§
impl RefUnwindSafe for TreeIterator
impl Send for TreeIterator
impl Sync for TreeIterator
impl Unpin for TreeIterator
impl UnwindSafe for TreeIterator
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.